Make unprivilaged user can see battery info.

This commit is contained in:
Takanori Watanabe 2004-03-04 17:03:49 +00:00
parent c5df0d743e
commit fe27a95e90

View File

@ -44,13 +44,16 @@
#define RC_RESUME_PATH "/etc/rc.resume"
static int acpifd;
static int
acpi_init()
{
acpifd = open(ACPIDEV, O_RDWR);
if (acpifd == -1)
if (acpifd == -1){
acpifd = open(ACPIDEV, O_RDONLY);
}
if (acpifd == -1){
err(EX_OSFILE, ACPIDEV);
}
}
static int