View Single Post
  #3   (View Single Post)  
Old 11th January 2009
ephemera's Avatar
ephemera ephemera is offline
Knuth's homeboy
 
Join Date: Apr 2008
Posts: 537
Default

try:
Code:
        if (sysctlbyname("hw.acpi.battery.life", &buf, &size, NULL, 0) < 0) {
             perror("sysctl"); 
             exit(1); 
       }

        printf("`%d'\n", buf);
Reply With Quote