[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [BusyBox] mount -a -t <fstype> behavior
From:       Rob Landley <rob () landley ! net>
Date:       2004-10-28 3:49:16
Message-ID: 200410272249.16513.rob () landley ! net
[Download RAW message or body]

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



_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic