shutdown.c (21931) | shutdown.c (24359) |
---|---|
1/* 2 * Copyright (c) 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 97 unchanged lines hidden (view full) --- 106#ifndef DEBUG 107 if (geteuid()) { 108 (void)fprintf(stderr, "shutdown: NOT super-user\n"); 109 exit(1); 110 } 111#endif 112 nosync = NULL; 113 readstdin = 0; | 1/* 2 * Copyright (c) 1988, 1990, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 97 unchanged lines hidden (view full) --- 106#ifndef DEBUG 107 if (geteuid()) { 108 (void)fprintf(stderr, "shutdown: NOT super-user\n"); 109 exit(1); 110 } 111#endif 112 nosync = NULL; 113 readstdin = 0; |
114 while ((ch = getopt(argc, argv, "-hknr")) != EOF) | 114 while ((ch = getopt(argc, argv, "-hknr")) != -1) |
115 switch (ch) { 116 case '-': 117 readstdin = 1; 118 break; 119 case 'h': 120 dohalt = 1; 121 break; 122 case 'k': --- 341 unchanged lines hidden --- | 115 switch (ch) { 116 case '-': 117 readstdin = 1; 118 break; 119 case 'h': 120 dohalt = 1; 121 break; 122 case 'k': --- 341 unchanged lines hidden --- |