Hi, On Sun, Oct 11, 2009 at 12:11 PM, Denys Vlasenko <[email protected]> wrote: > On Saturday 10 October 2009 21:51, Vladimir Dronnikov wrote: >> >> > >> >> > I added bb_perror_msg("can't execute '%s'", argv[0]) >> >> > in spawn() in git... >> >> >> >> Hmm. spawn() was meant to be silent. >> > >> > Set logmode = 0 and it will be. >> > >> >> What is impact in other applets then? I never knew of "logmode" at >> all. Where is it? What is it? Anyone knows of it? > > I meant: if you need to call spawn() so that it does not complain, > set logmode global variable to 0 before the call. > >> >> It is mount.c that should bark >> >> unless quiet option is given, IMHO. >> > >> > It is hard to reliably detect exec failure after fork. >> > Parent can only see they child exited with some exitcode or signal, >> > how it can know that child exited because exec in the child failed? >> > >> >> Right. But then the routinr deserves to be named WARN_UNLESS_spawn(), >> doesn't it? > >> And, personally, spent time to make ntfs-3g mount helper >> silent (patch can be given) if it is a helper to mount NTFS. Otherwise >> it constantly barks when I try ti auto-mount non-NTFS devices which >> happen to have filesystem named farther than ntfs (squashfs, e.g.) -- >> that is because the kenrel tries to auto=probe filesystems by the >> order >> thay go in /{etc,proc}/filesystems (really, kernel-side Kbuild(s)). Do >> we mean it? > > Aha, I see. There is a case when mount tries many filesystems, > and complaining "can't run mount.<fs1>", "can't run mount.<fs2>" > is bad. > > It would be much easier to understand the problem if you would simply > show the command where it is a problem. Like this: > > # busybox mount /dir/in/fstab > mount: can't execute 'mount.reiserfs': No such file or directory > mount: can't execute 'mount.ext3': No such file or directory > mount: can't execute 'mount.ext2': No such file or directory > mount: can't execute 'mount.cramfs': No such file or directory > mount: can't execute 'mount.minix': No such file or directory > mount: can't execute 'mount.vfat': No such file or directory > mount: can't execute 'mount.msdos': No such file or directory > mount: can't execute 'mount.iso9660': No such file or directory > mount: can't execute 'mount.romfs': No such file or directory > mount: mounting /dev/hdb on /dir/in/fstab failed: Input/output error > > Ok. I am reverting the change to spawn().
How about spawn() does an fstat on the target first, and immediately (but silently) returns an error code if not present? Then the caller can decide what to do with it. John -- John Williams, PhD, B.Eng, B.IT PetaLogix - Linux Solutions for a Reconfigurable World w: www.petalogix.com p: +61-7-30090663 f: +61-7-30090663 _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
