summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas Bächler <thomas@archlinux.org>2013-12-21 11:22:37 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-21 22:52:56 -0500
commite2f123b97b9af34f39cb18ce0c1c5ef6cb89117e (patch)
tree0d03edd40d493201cf535adb6e76661adf20e725 /src
parent5b04fe60004e7c5cd5a43648ede3e6a965e70b8c (diff)
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".
Diffstat (limited to 'src')
-rw-r--r--src/fstab-generator/fstab-generator.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index 1227f0895d..5480e54b4e 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -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;