]> Joshua Wise's Git repositories - netwatch.git/blobdiff - tools/smram-linux-tool.c
SMRAM interface changes, and a few misc. header changes.
[netwatch.git] / tools / smram-linux-tool.c
index 0d47bb4b63a0b477a1a34daf1473e2fd151e7ef0..0511f6be493fcef6733b6ae104d33d96c518f5bb 100644 (file)
@@ -2,6 +2,7 @@
 #include <getopt.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <smram.h>
 
 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;
This page took 0.022805 seconds and 4 git commands to generate.