[BusyBox] mount -a -t <fstype> behavior
Rob Landley
rob at landley.net
Thu Oct 28 03:49:16 UTC 2004
On Wednesday 27 October 2004 22:19, Jerome Gobuyan wrote:
> I'm using 2.4.20 with libc-2.3.2.
>
> I think the problem is more in mount_main() around line 478. There is no
> check for got_filesystemType indicating that a -t option is present,
> resulting in ALL filesystems being mounted whether or not the -t option
> is present.
Line 463:
filesystemType = bb_xstrdup(m->mnt_type);
Now, ignoring the fact that the strdup here serves no purpose except to leak
memory (filesystemType is a local variable just like m->mnt_type, so their
lifetime rules are identical), this stomps the information that would be used
to compare whether or not it's the same mount.
Now you could add another test around like 450, something like
|| (strcmp(filesystemType,"auto") && !strcmp(filesystemType,m->mnt_type))
That might do what you wanted.
Rob
More information about the busybox
mailing list