summaryrefslogtreecommitdiff
path: root/util-linux/mount.c
diff options
context:
space:
mode:
authorDenis Vlasenko2009-04-12 12:16:21 +0000
committerDenis Vlasenko2009-04-12 12:16:21 +0000
commit5c3299300905698c45d1ace64a61a431312993a4 (patch)
treef89cb98e77ed897e29dd7993693c5cf0433ccb82 /util-linux/mount.c
parentf8de411e2428b9c8878a8be3602f022812a3ab70 (diff)
downloadbusybox-5c3299300905698c45d1ace64a61a431312993a4.zip
busybox-5c3299300905698c45d1ace64a61a431312993a4.tar.gz
mount: users report that CIFS support is breaking things,
mostly remove it.
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r--util-linux/mount.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index d647c71..694057b 100644
--- a/util-linux/mount.c
+++ b/util-linux/mount.c
@@ -419,12 +419,12 @@ static int mount_it_now(struct mntent *mp, long vfsflags, char *filteropts)
int errno_save = errno;
args[0] = xasprintf("mount.%s", mp->mnt_type);
rc = 1;
+ args[rc++] = mp->mnt_fsname;
+ args[rc++] = mp->mnt_dir;
if (filteropts) {
args[rc++] = (char *)"-o";
args[rc++] = filteropts;
}
- args[rc++] = mp->mnt_fsname;
- args[rc++] = mp->mnt_dir;
args[rc] = NULL;
rc = wait4pid(spawn(args));
free(args[0]);
@@ -1605,22 +1605,24 @@ static int singlemount(struct mntent *mp, int ignore_busy)
&& (mp->mnt_fsname[0] == '/' || mp->mnt_fsname[0] == '\\')
&& mp->mnt_fsname[0] == mp->mnt_fsname[1]
) {
+#if 0 /* reported to break things */
len_and_sockaddr *lsa;
char *ip, *dotted;
char *s;
- rc = 1;
// Replace '/' with '\' and verify that unc points to "//server/share".
for (s = mp->mnt_fsname; *s; ++s)
if (*s == '/') *s = '\\';
// Get server IP
s = strrchr(mp->mnt_fsname, '\\');
- if (s <= mp->mnt_fsname+1) goto report_error;
+ if (s <= mp->mnt_fsname+1)
+ goto report_error;
*s = '\0';
lsa = host2sockaddr(mp->mnt_fsname+2, 0);
*s = '\\';
- if (!lsa) goto report_error;
+ if (!lsa)
+ goto report_error;
// Insert ip=... option into string flags.
dotted = xmalloc_sockaddr2dotted_noport(&lsa->u.sa);
@@ -1630,18 +1632,19 @@ static int singlemount(struct mntent *mp, int ignore_busy)
// Compose new unc '\\server-ip\share'
// (s => slash after hostname)
mp->mnt_fsname = xasprintf("\\\\%s%s", dotted, s);
-
- // Lock is required
+#endif
+ // Lock is required [why?]
vfsflags |= MS_MANDLOCK;
-
mp->mnt_type = (char*)"cifs";
rc = mount_it_now(mp, vfsflags, filteropts);
+#if 0
if (ENABLE_FEATURE_CLEAN_UP) {
free(mp->mnt_fsname);
free(ip);
free(dotted);
free(lsa);
}
+#endif
goto report_error;
}