[BusyBox] Patch to add quiet flag to mount/umount
Rob Landley
rob at landley.net
Fri Jul 2 14:02:03 UTC 2004
On Friday 02 July 2004 01:11, Stephan Linz wrote:
> Am Freitag, 2. Juli 2004 06:45 schrieb Erico Mendonca:
> > This is a patch to add a "-q" (quiet mode) parameter to mount and
> > umount. These should suppress any error or status messages when used.
> >
> > These are made against busybox-1.00-pre10.
> >
> > I hope this can be useful to somebody...
>
> Hm, I think the most people will want to use a redirection to /dev/null
> (something like 2>/dev/null) to suppress any error messages. This new
> option is nice to have and you schould enclose your q-option-code with a
> CPP define to save space for anybody who doesn't want to use this
> functionality.
It might be smaller to have -q do "dup2(open("/dev/null"),2);". One line, no
changes needed to the rest of the program. Might be small enough not to need
an #ifdef then...
(Sadly, you can't just close(2), because then the next open will re-use it...)
> Best regards,
> Stephan Linz
Rob
--
www.linucon.org: Linux Expo and Science Fiction Convention
October 8-10, 2004 in Austin Texas. (I'm the con chair.)
More information about the busybox
mailing list