Annotation of researchv9/cmd/halt.c, revision 1.1.1.1

1.1       root        1: static char *sccsid = "@(#)halt.c      4.2 (Berkeley) 11/10/80";
                      2: /*
                      3:  * Halt
                      4:  */
                      5: #include <stdio.h>
                      6: #include <sys/reboot.h>
                      7: 
                      8: main(argc, argv)
                      9:        int argc;
                     10:        char **argv;
                     11: {
                     12:        int howto;
                     13: 
                     14:        howto = RB_HALT;
                     15:        argc--, argv++;
                     16:        while (argc > 0) {
                     17:                if (!strcmp(*argv, "-n"))
                     18:                        howto |= RB_NOSYNC;
                     19:                else {
                     20:                        fprintf(stderr, "usage: halt [ -n ]\n");
                     21:                        exit(1);
                     22:                }
                     23:                argc--, argv++;
                     24:        }
                     25:        reboot(howto);
                     26:        perror("reboot");
                     27: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.