Vladimir Dronnikov (ybrnj80 at yandex dot ru) pointed out that my cleanup of

his code introduced a bug (an extra backslash in the CIFS mount string).
This commit is contained in:
Rob Landley 2006-09-05 14:00:21 +00:00
parent 02496aa69e
commit 4cb035dd23

View File

@ -253,8 +253,8 @@ static int mount_it_now(struct mntent *mp, int vfsflags, char *filteropts)
return rc; return rc;
} }
// Mount one directory. Handles CIFS, NFS, loopback, autobind, and filesystem type // Mount one directory. Handles CIFS, NFS, loopback, autobind, and filesystem
// detection. Returns 0 for success, nonzero for failure. // type detection. Returns 0 for success, nonzero for failure.
static int singlemount(struct mntent *mp, int ignore_busy) static int singlemount(struct mntent *mp, int ignore_busy)
{ {
@ -301,7 +301,7 @@ static int singlemount(struct mntent *mp, int ignore_busy)
// compose new unc '\\server-ip\share' // compose new unc '\\server-ip\share'
s = xasprintf("\\\\%s\\%s",ip+3,strchr(mp->mnt_fsname+2,'\\')); s = xasprintf("\\\\%s%s",ip+3,strchr(mp->mnt_fsname+2,'\\'));
if (ENABLE_FEATURE_CLEAN_UP) free(mp->mnt_fsname); if (ENABLE_FEATURE_CLEAN_UP) free(mp->mnt_fsname);
mp->mnt_fsname = s; mp->mnt_fsname = s;