]> Joshua Wise's Git repositories - netwatch.git/blobdiff - tools/smram-linux-tool.c
more licensing
[netwatch.git] / tools / smram-linux-tool.c
index 0d47bb4b63a0b477a1a34daf1473e2fd151e7ef0..02112a48a101cc32893e019e75f4760510078e32 100644 (file)
@@ -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 <unistd.h>
 #include <getopt.h>
 #include <stdlib.h>
 #include <stdio.h>
+#include <smram.h>
 
 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;
This page took 0.023345 seconds and 4 git commands to generate.