Make unprivilaged user can see battery info.
This commit is contained in:
parent
c5df0d743e
commit
fe27a95e90
@ -44,14 +44,17 @@
|
||||
#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
|
||||
acpi_enable_disable(int enable)
|
||||
|
Loading…
Reference in New Issue
Block a user