Initial Upload

This commit is contained in:
iDunnoDev
2022-12-06 11:49:47 +00:00
committed by iDunnoDev
commit 0ee33aaa97
274 changed files with 60109 additions and 0 deletions

24
shutdown.c Normal file
View File

@ -0,0 +1,24 @@
#include "types.h"
#include "user.h"
int main(int argc, char *argv[]) {
int restart = 0;
for (int i = 1; i < argc; i++) {
if (strcmp(argv[i], "-r") == 0) {
restart = 1;
}
}
switch(restart) {
case 0:
printf(1, "Shutting Down...\n");
break;
case 1:
printf(1, "Restarting...\n");
break;
}
shutdown(restart);
exit();
}