diff options
Diffstat (limited to 'usr.sbin/acpi/acpiconf')
-rw-r--r-- | usr.sbin/acpi/acpiconf/acpiconf.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/usr.sbin/acpi/acpiconf/acpiconf.c b/usr.sbin/acpi/acpiconf/acpiconf.c index 377f0f9..123e485 100644 --- a/usr.sbin/acpi/acpiconf/acpiconf.c +++ b/usr.sbin/acpi/acpiconf/acpiconf.c @@ -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 |