fstab-generator: Do not try to fsck non-devices

This fixes a regression introduced in 64e70e4 where the mount fails
when fstab is misconfigured with fs_passno > 0 on a virtual file
system like nfs, and the type is specified as "auto".
This commit is contained in:
Thomas Bächler 2013-12-21 11:22:37 +01:00 committed by Zbigniew Jędrzejewski-Szmek
parent 5b04fe6000
commit e2f123b97b
1 changed files with 5 additions and 0 deletions

View File

@ -152,6 +152,11 @@ static int add_fsck(FILE *f, const char *what, const char *where, const char *ty
if (passno == 0)
return 0;
if (!is_device_path(what)) {
log_warning("Checking was requested for \"%s\", but it is not a device.", what);
return 0;
}
if (type && !streq(type, "auto")) {
int r;
const char *checker;