summaryrefslogtreecommitdiffstats
path: root/mount/mount.c
diff options
context:
space:
mode:
authorKarel Zak2007-10-22 15:49:26 +0200
committerKarel Zak2007-10-25 21:50:59 +0200
commit89fde75b38cf8c99c1cc5c6b6c206de521e551f4 (patch)
tree51fcd85dad2bc9421e619ec696f8795cdae235f5 /mount/mount.c
parentdocs: add info about .bugfix releases and branches (diff)
downloadkernel-qcow2-util-linux-89fde75b38cf8c99c1cc5c6b6c206de521e551f4.tar.gz
kernel-qcow2-util-linux-89fde75b38cf8c99c1cc5c6b6c206de521e551f4.tar.xz
kernel-qcow2-util-linux-89fde75b38cf8c99c1cc5c6b6c206de521e551f4.zip
mount: cleanup canonicalize() usage
This patch renames canonicalize() to canonicalize_mountpoint() and moves this function to realpath.c where is all cannonicalize code. The canonicalize_mountpoint() function checks for special "none", "proc", "swap" pseudo mointpoint. The patch also adds a new generic canonicalize() function. Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/mount.c')
-rw-r--r--mount/mount.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mount/mount.c b/mount/mount.c
index b65ee62ce..42f87b03e 100644
--- a/mount/mount.c
+++ b/mount/mount.c
@@ -42,6 +42,7 @@
#include "mount_paths.h"
#include "env.h"
#include "nls.h"
+#include "realpath.h"
#define DO_PS_FIDDLING
@@ -926,7 +927,7 @@ update_mtab_entry(const char *spec, const char *node, const char *type,
struct my_mntent mnt;
mnt.mnt_fsname = canonicalize (spec);
- mnt.mnt_dir = canonicalize (node);
+ mnt.mnt_dir = canonicalize_mountpoint (node);
mnt.mnt_type = type;
mnt.mnt_opts = opts;
mnt.mnt_freq = freq;
@@ -1451,7 +1452,7 @@ mounted (const char *spec0, const char *node0) {
return ret;
spec = canonicalize(spec0);
- node = canonicalize(node0);
+ node = canonicalize_mountpoint(node0);
mc0 = mtab_head();
for (mc = mc0->nxt; mc && mc != mc0; mc = mc->nxt)