Signed-off-by: John Crispin <blogic@openwrt.org>
return;
}
- if (stat(e2fsck, &statbuf) < 0)
- return;
-
- if (!(statbuf.st_mode & S_IXUSR))
+ if (stat(e2fsck, &statbuf) < 0) {
+ fprintf(stderr, "check_filesystem: %s not found\n", e2fsck);
return;
+ }
pid = fork();
if (!pid) {
exit(-1);
} else if (pid > 0) {
int status;
+
waitpid(pid, &status, 0);
+ if (WEXITSTATUS(status))
+ fprintf(stderr, "check_filesystem: %s returned %d\n", e2fsck, WEXITSTATUS(status));
}
}