On Wednesday 14 April 2010 11:10, [email protected] wrote:
> Sorry for my disturbance~
>
> I’ve a problem with using Busybox ver. 1.16.1 :
>
> When I use “ mount -t cifs -o username=x,password=x //host/xxx /mnt/cifs ”
> command to mount my SMB server,
>
> I always get the response : mounting //host/xxx on /mnt/cifs/ failed: No
> such device or address,
>
> but the command is workable before ver. 1.15.3.
>
>
>
> I read the announcements and changed my command: “ mount -t cifs -o
> username=x,password=x,ip=IPADDR //host/xxx /mnt/cifs ”,
>
> and I got the same result :-(
>
>
>
> Could you give me some hints? Thanks a lot and wish to get your reply
So 1.15.3 works but 1.16.1 does not? Please confirm that it is true
for these exact versions.
If it is true: the changes between 1.15.3 and 1.16.x is that
now mount adds "ip=ADDR" option (deriving ADDR from //host/ part).
From your description it looks like _adding_ that option breaks things.
This is weird, but first, let's verify that it is true.
First, run mount with -v (verbose):
mount -vv -t cifs -o username=x,password=x //host/xxx /mnt/cifs
and let me know what it says.
Then, comment out code in mount.c which adds ip=ADDR
by adding #if 0 as shown below:
if (ENABLE_FEATURE_MOUNT_CIFS
&& (!mp->mnt_type || strcmp(mp->mnt_type, "cifs") == 0)
&& (mp->mnt_fsname[0] == '/' || mp->mnt_fsname[0] == '\\')
&& mp->mnt_fsname[0] == mp->mnt_fsname[1]
) {
int len;
char c;
len_and_sockaddr *lsa;
char *hostname, *dotted, *ip;
hostname = mp->mnt_fsname + 2;
len = strcspn(hostname, "/\\");
if (len == 0 || hostname[len] == '\0')
goto report_error;
c = hostname[len];
hostname[len] = '\0';
lsa = host2sockaddr(hostname, 0);
hostname[len] = c;
if (!lsa)
goto report_error;
#if 0
// Insert "ip=..." option into options
dotted = xmalloc_sockaddr2dotted_noport(&lsa->u.sa);
if (ENABLE_FEATURE_CLEAN_UP) free(lsa);
ip = xasprintf("ip=%s", dotted);
if (ENABLE_FEATURE_CLEAN_UP) free(dotted);
parse_mount_options(ip, &filteropts);
if (ENABLE_FEATURE_CLEAN_UP) free(ip);
#endif
// "-o mand" is required [why?]
vfsflags |= MS_MANDLOCK;
mp->mnt_type = (char*)"cifs";
rc = mount_it_now(mp, vfsflags, filteropts);
goto report_error;
}
recompile, rerun mount (still with -vv) and let me know what it says
and whether now it succeeds.
--
vda
_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox