[BusyBox] [patch] new applet mountpoint
Bernhard Fischer
rep.nop at aon.at
Fri Aug 19 10:07:53 UTC 2005
On Fri, Aug 19, 2005 at 11:40:57AM +0200, Rainer Weikusat wrote:
>Bernhard Fischer <rep.nop at aon.at> writes:
>> Attached patch adds a mountpoint(1) applet.
>>
>> $ size miscutils/mountpoint.o
>> text data bss dec hex filename
>> 614 0 0 614 266 miscutils/mountpoint.o
>>
>> It's relatively big but feature complete.
>> Ok?
>
>Given that busybox may eventually include an operating system kernel
>and a C library of its own :->, but will certainly never
>(substantially) work with a different kernel than Linux, why not
>
>mountpoint()
>{
> cut -d' ' -f2 /proc/mounts | grep -q "$1"
>}
>
>plus a set of similar small shell functions that print the other
>information, insofar requested?
Well, so let's zap head and tail too?
head () { handle_args_with_dd_etc ; awk '{print $0;exit}' "$1" ; }
tail () { handle_args_with_dd_etc ; awk 'END{print $0;}' "$1" ; }
head is about a 60% of the size of mointpoint, tail is more than
three times bigger than mountpoint..
Then one could replace cut with a simple sed script and replace half of
at least coreutils by awk scripts ;)
Serious. If you do not want to use it but would accept it to be applied,
just don't build it, i'd say.
friendly,
Bernhard
More information about the busybox
mailing list