7 static struct option longopts[] = {
8 { "open", no_argument, NULL, 'o' },
9 { "close", no_argument, NULL, 'c' },
10 { "dump", no_argument, NULL, 'd' },
17 void usage(int argc, char **argv)
19 printf("Usage: %s [ --dump ] [ --open | --close ]\n",
24 int main(int argc, char **argv)
28 printf("%s: This program must be run as root.\n", argv[0]);
35 while ((ch = getopt_long(argc, argv, "ocsd:", longopts, NULL)) != -1)
40 if (op & OP_SET) usage(argc, argv);
45 if (op & OP_SET) usage(argc, argv);
56 if (!op) usage(argc, argv);
65 smram_aseg_set_state(do_open ? SMRAM_ASEG_OPEN : SMRAM_ASEG_SMMONLY);