fsck: consider a fsck implementation linked to /bin/true non-existant

This commit is contained in:
Lennart Poettering
2014-06-25 10:04:36 +02:00
parent fbe1a1a94f
commit 571d0134bd
3 changed files with 30 additions and 14 deletions
+6 -3
View File
@@ -49,10 +49,13 @@ int generator_write_fsck_deps(
if (!isempty(fstype) && !streq(fstype, "auto")) {
int r;
r = fsck_exists(fstype);
if (r < 0) {
log_warning("Checking was requested for %s, but fsck.%s cannot be used: %s", what, fstype, strerror(-r));
if (r == -ENOENT) {
/* treat missing check as essentially OK */
return r == -ENOENT ? 0 : r;
log_debug("Checking was requested for %s, but fsck.%s does not exist: %s", what, fstype, strerror(-r));
return 0;
} else if (r < 0) {
log_warning("Checking was requested for %s, but fsck.%s cannot be used: %s", what, fstype, strerror(-r));
return r;
}
}