[BusyBox] Mount problems with busybox

Brian Webb webbb at desertscenes.net
Sat Mar 10 18:39:17 UTC 2001


Erik,

This is a follow up to an email that I sent you yesterday about a problem that
I was having mounting using busybox on my Agenda PDA.  It turns out that to
fix this problem I added the following line to mount.c:

			device = strdup(m->mnt_fsname);
			directory = strdup(m->mnt_dir);
			filesystemType = strdup(m->mnt_type);
+			string_flags = strdup(string_flags);
singlemount:			
			rc = EXIT_SUCCESS;
#ifdef BB_NFSMOUNT

It would appear that the mount call did not like taking a stack allocated
pointer.  I'm not sure of the validity of this fix or even why it's necessary,
but it seems to work.  Should the memory allocated with strdup be freed
somewhere?  There seem to be several other strdup calls that aren't freed...

Thanks,

Brian






More information about the busybox mailing list