diff options
| author | Warner Losh <imp@FreeBSD.org> | 2000-07-19 06:34:02 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2000-07-19 06:34:02 +0000 |
| commit | ad5536b59f3205ecb8c086eb7cfbcbebb277bfbe (patch) | |
| tree | f74bf3f28a506ac9cdca0455a4f48333a306257a | |
| parent | 785c4f1a3dcaa8c831f8d5d19ae064a50fdab1bb (diff) | |
Notes
| -rw-r--r-- | usr.sbin/apm/apm.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/apm/apm.c b/usr.sbin/apm/apm.c index 89d3a50ce3a9..e64dc7b5fd72 100644 --- a/usr.sbin/apm/apm.c +++ b/usr.sbin/apm/apm.c @@ -412,7 +412,10 @@ main(int argc, char *argv[]) argv += optind; } finish_option: - fd = open(APMDEV, O_RDWR); + if (haltcpu != -1 || enable != -1 || delta || sleep || standby) + fd = open(APMDEV, O_RDWR); + else + fd = open(APMDEV, O_RDONLY); if (fd == -1) err(1, "can't open %s", APMDEV); if (enable != -1) |
