X-Git-Url: http://git.openwrt.org/?p=project%2Fubox.git;a=blobdiff_plain;f=block.c;h=2108a8dab0d4eb557109b5b6b1d3337aed33db16;hp=15f4b0f84156e63a6e7ad665336eb96468b09218;hb=01c0caf457a55488cfb749a0c17bbbd7e24d4328;hpb=797431c123579136283abb204a8e9babf235e20a diff --git a/block.c b/block.c index 15f4b0f..2108a8d 100644 --- a/block.c +++ b/block.c @@ -456,11 +456,10 @@ static void check_filesystem(struct blkid_struct_probe *pr) 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) { @@ -468,7 +467,10 @@ static void check_filesystem(struct blkid_struct_probe *pr) 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)); } }