X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/c43bc43891ee5fad288ca72f101878bd84164845..81148fa15713ee68be49610206526d0725a5868f:/tools/smram-linux-tool.c?ds=inline diff --git a/tools/smram-linux-tool.c b/tools/smram-linux-tool.c index 0d47bb4..0511f6b 100644 --- a/tools/smram-linux-tool.c +++ b/tools/smram-linux-tool.c @@ -2,6 +2,7 @@ #include #include #include +#include static struct option longopts[] = { { "open", no_argument, NULL, 'o' }, @@ -24,7 +25,7 @@ int main(int argc, char **argv) { if (geteuid() != 0) { - printf("This program must be run as root, dumbass.\n"); + printf("%s: This program must be run as root.\n", argv[0]); return 1; } @@ -61,7 +62,7 @@ int main(int argc, char **argv) if (op & OP_SET) { - smram_aseg_set_state(do_open); + smram_aseg_set_state(do_open ? SMRAM_ASEG_OPEN : SMRAM_ASEG_SMMONLY); } return 0;