search for: reboot_arg

Displaying 2 results from an estimated 2 matches for "reboot_arg".

2017 May 22
0
[PATCH] Add support for reboot syscall argument
...roff} [-n]\n"; + static char mesg[] = "Usage: {halt|reboot|poweroff} [-n] [reboot-arg]\n"; write(2, mesg, sizeof(mesg) - 1); exit(1); } @@ -16,6 +16,7 @@ int main(int argc, char *argv[]) int cmd = 0; /* initalize to shut gcc up */ int do_sync = 1; char *ptr, *ptr2; + char *reboot_arg = NULL; /* Which action (program name)? */ ptr2 = ptr = argv[0]; @@ -32,23 +33,30 @@ int main(int argc, char *argv[]) usage(); /* Walk options */ - while (*++argv && **argv == '-') - switch (*++*argv) { - case 'f': - break; /* -f assumed */ - case 'n...
2019 Jan 18
0
[klibc:master] Add support for reboot syscall argument
...roff} [-n]\n"; + static char mesg[] = "Usage: {halt|reboot|poweroff} [-n] [reboot-arg]\n"; write(2, mesg, sizeof(mesg) - 1); exit(1); } @@ -16,6 +16,7 @@ int main(int argc, char *argv[]) int cmd = 0; /* initalize to shut gcc up */ int do_sync = 1; char *ptr, *ptr2; + char *reboot_arg = NULL; /* Which action (program name)? */ ptr2 = ptr = argv[0]; @@ -32,23 +33,28 @@ int main(int argc, char *argv[]) usage(); /* Walk options */ - while (*++argv && **argv == '-') - switch (*++*argv) { - case 'f': - break; /* -f assumed */ - case 'n...