Keno Fischer has uploaded this change for review.

View Change

flashrom: Make platform-specific errors only print on that platform

Rather than printing all possible errors on all platforms, add ifdefs
to only print the error for the platform that's currently running, in
preparation for adding more cases here.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Change-Id: I4d1e369cb60e160f555f1f9f0c832fe27b75e9de
---
M hwaccess_x86_io.c
1 file changed, 17 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/flashrom refs/changes/68/68468/1
diff --git a/hwaccess_x86_io.c b/hwaccess_x86_io.c
index c3ad313..de683dd 100644
--- a/hwaccess_x86_io.c
+++ b/hwaccess_x86_io.c
@@ -264,10 +264,13 @@
msg_perr("ERROR: Could not get I/O privileges (%s).\n", strerror(errno));
msg_perr("Make sure you are root. If you are root, your kernel may still\n"
"prevent access based on security policies.\n");
+#if defined(__OpenBSD__)
msg_perr("On OpenBSD set securelevel=-1 in /etc/rc.securelevel and\n"
"reboot, or reboot into single user mode.\n");
+#elif defined(__NetBSD__)
msg_perr("On NetBSD reboot into single user mode or make sure\n"
"that your kernel configuration has the option INSECURE enabled.\n");
+#endif
return 1;
}


To view, visit change 68468. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I4d1e369cb60e160f555f1f9f0c832fe27b75e9de
Gerrit-Change-Number: 68468
Gerrit-PatchSet: 1
Gerrit-Owner: Keno Fischer <keno@alumni.harvard.edu>
Gerrit-MessageType: newchange