X-Git-Url: http://git.joshuawise.com/netwatch.git/blobdiff_plain/99970893290223f2006c3a0c6f34ab9eaf5cb4c9..2745bcf912e2230ef948b3e0d636bbd16e3fefb6:/tools/smram-linux-tool.c?ds=inline diff --git a/tools/smram-linux-tool.c b/tools/smram-linux-tool.c index 0d47bb4..02112a4 100644 --- a/tools/smram-linux-tool.c +++ b/tools/smram-linux-tool.c @@ -1,7 +1,19 @@ +/* smram-linux-tool.c + * General SMRAM manipulation utility + * NetWatch system management mode administration console + * + * Copyright (c) 2008 Jacob Potter and Joshua Wise. All rights reserved. + * This program is free software; you can redistribute and/or modify it under + * the terms found in the file LICENSE in the root of this source tree. + * + */ + + #include #include #include #include +#include static struct option longopts[] = { { "open", no_argument, NULL, 'o' }, @@ -24,7 +36,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 +73,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;