From: Ben Gras Date: Thu, 4 Aug 2005 13:41:31 +0000 (+0000) Subject: Let halt shutdown system without fsck by checking for halt in wtmp X-Git-Tag: v3.1.0~454 X-Git-Url: http://zhaoyanbai.com/repos/man.named-checkzone.html?a=commitdiff_plain;h=f784f768910df19175df6638419c7c91a99f9092;p=minix.git Let halt shutdown system without fsck by checking for halt in wtmp as well as shutdown --- diff --git a/commands/reboot/shutdown.c b/commands/reboot/shutdown.c index 71e5753b1..ac1cef8e2 100755 --- a/commands/reboot/shutdown.c +++ b/commands/reboot/shutdown.c @@ -402,7 +402,8 @@ int crash_check() crashed = (lseek(fd, - (off_t) sizeof(last), SEEK_END) == -1 || read(fd, (void *) &last, sizeof(last)) != sizeof(last) || last.ut_line[0] != '~' - || strncmp(last.ut_user, "shutdown", sizeof(last.ut_user))); + || (strncmp(last.ut_user, "shutdown", sizeof(last.ut_user)) + && strncmp(last.ut_user, "halt", sizeof(last.ut_user)))); close(fd); return crashed; }