diff options
author | Karel Zak | 2013-10-01 16:07:50 +0200 |
---|---|---|
committer | Karel Zak | 2013-10-01 16:07:50 +0200 |
commit | 0525768a5be893d309917fbb527b1cf0589fdaa2 (patch) | |
tree | 64216a8bf067e704c7264d0551cc2b0f6e830892 /disk-utils/fsck.c | |
parent | losetup: don't require 512-byte aligned offsets (diff) | |
download | kernel-qcow2-util-linux-0525768a5be893d309917fbb527b1cf0589fdaa2.tar.gz kernel-qcow2-util-linux-0525768a5be893d309917fbb527b1cf0589fdaa2.tar.xz kernel-qcow2-util-linux-0525768a5be893d309917fbb527b1cf0589fdaa2.zip |
fsck: don't print warning if there is no /etc/fstab at all
Reported-by: Thomas Bächler <thomas@archlinux.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'disk-utils/fsck.c')
-rw-r--r-- | disk-utils/fsck.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/disk-utils/fsck.c b/disk-utils/fsck.c index 1d05faf54..19eabe349 100644 --- a/disk-utils/fsck.c +++ b/disk-utils/fsck.c @@ -440,10 +440,14 @@ static void load_fs_info(void) if (mnt_table_parse_fstab(fstab, path)) { if (!path) path = mnt_get_fstab_path(); - if (errno) - warn(_("%s: failed to parse fstab"), path); - else - warnx(_("%s: failed to parse fstab"), path); + + /* don't print error when there is no fstab at all */ + if (access(path, F_OK) == 0) { + if (errno) + warn(_("%s: failed to parse fstab"), path); + else + warnx(_("%s: failed to parse fstab"), path); + } } } |