X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/99970893290223f2006c3a0c6f34ab9eaf5cb4c9..07d1dd26f38ed450a9333741337e8091b37b4fc2:/tools/smram-linux-tool.c?ds=sidebyside 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;