[BusyBox] Patch to add quiet flag to mount/umount

Rob Landley rob at landley.net
Sat Jul 3 13:38:59 UTC 2004


On Friday 02 July 2004 16:08, Erik Andersen wrote:

> > How about something like a global config directive such as
> > SHUT_UP_BUSYBOX that will make all applets mute? :P
>
> Something like this?

It works, I'm not sure how useful it is.  (Then again, if somebody _has_ a 
user for it...)

In the case of mount -q, assuming the message to be suppressed are going to 
stderr rather than stdout, close(2) followed by open("/dev/null") should do 
the trick.  (If messages go to stdout and stderr, then close(1), close(2), 
open(), and dup() ought to do it.  Ala Eric's patch.

Easier than putting tests around every message, and probably smaller too.

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