/bin/shutdown: fixed bug, was returning non zero even on shutdown

success. Spotted by mcandre, thanks!
This commit is contained in:
Philippe Houdoin 2018-05-03 12:22:45 +02:00
parent 1894e9b6a7
commit 91077c485a
1 changed files with 3 additions and 2 deletions

View File

@ -183,9 +183,10 @@ main(int argc, char **argv)
BRoster roster; BRoster roster;
BRoster::Private rosterPrivate(roster); BRoster::Private rosterPrivate(roster);
status_t error = rosterPrivate.ShutDown(gReboot, askUser, !async); status_t error = rosterPrivate.ShutDown(gReboot, askUser, !async);
if (error != B_OK) if (error != B_OK) {
fprintf(stderr, "Shutdown failed: %s\n", strerror(error)); fprintf(stderr, "Shutdown failed: %s\n", strerror(error));
return 2; return 2;
}
} }
return 0; return 0;