summaryrefslogtreecommitdiff
path: root/utils/umount.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2014-11-21 04:08:57 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2014-11-21 04:08:57 +0100
commit36f340ae47a0f643be6d59a8190600cdd34eef0c (patch)
treec9e876b6c755dd53bc3a7aeedda1b88295c8fd3e /utils/umount.c
parentf981d5bdba78ef72dbbf0d22c146890a305d487c (diff)
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.
Diffstat (limited to 'utils/umount.c')
-rw-r--r--utils/umount.c4
1 files changed, 1 insertions, 3 deletions
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);
}
}