From 36f340ae47a0f643be6d59a8190600cdd34eef0c Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Fri, 21 Nov 2014 04:08:57 +0100 Subject: Always canonicalize fstab entries with realpath To avoid spurious ./, /, symlinks, etc. * sutils/fstab.c (fs_set_mntent): Try to call realpath on mnt_fsname and mnt_dir field of `mntent'. (fstab_find_mount): Try to call realpath on `name' parameter. (fstab_find): Do not try to call realpath. (fstab_read): Reset errno to zero before calling getmntent. * utils/umount.c (main): Do not warn about missing fstab entries for active translators. --- utils/umount.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'utils') diff --git a/utils/umount.c b/utils/umount.c index cf6be220..4005029f 100644 --- a/utils/umount.c +++ b/utils/umount.c @@ -292,8 +292,6 @@ main (int argc, char **argv) fs = fstab_find_device (fstab, t); if (! fs) { - error (0, 0, "could not find entry for: %s", t); - /* As last resort, just assume it is the mountpoint. */ struct mntent m = { @@ -307,7 +305,7 @@ main (int argc, char **argv) err = fstab_add_mntent (fstab, &m, &fs); if (err) - error (2, err, "%s", t); + error (2, err, "could not find entry for: %s", t); } } -- cgit v1.2.3