mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
When we're just reading info from the driver, attempt to open the apm
device read only so we can suppot a readonly apm device.
This commit is contained in:
parent
785c4f1a3d
commit
ad5536b59f
1 changed files with 4 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue