On Sun, Jun 21, 2020 at 4:56 AM Eli Schwartz <eschwa...@archlinux.org> wrote:
> On 6/20/20 7:26 AM, Mike Davies wrote:
> > So whos brilliant idea was it to select 'nuke' to be built by default ?

Almost all options are "on" by default.
There should be a special reason (documented in a comment)
why option is off by default (e.g. "non-standard behavior"
or "some common libc don't have necessary defines / functions
to compile it").

> > There is no documentation online for it.
> >
> > You happen to type in nuke ..
> >
> > and bye bye file system
> >
> > Would it not be more sensible to disable it by default ?
> While I agree it is a stupid applet -- it is literally an alias for rm
> -rf, and defined as such by the menuconfig help -- I would also like to
> point out that './busybox nuke --help' will emit help output for it. And
> you should not "happen" to type in suspicious arguments to commands you
> don't understand, it's a lot more understandable for "nuke .." to do
> something wrong than "nuke -h" or "nuke --help".
>
> (It's also true that by design, to mimic the historical behavior of the
> tool it copies from, it takes no arguments, ignores most sanity checks
> and has a completely useless return status. I suppose --help slips by
> because it's parsed before the applet itself?)
>
> ...
>
> Honestly I just strip this out of my busybox builds on the grounds I
> don't need completely useless code bloating the binary, even if it is
> "only 2.9 kb".

It's 2.9 kb only when busybox with no applets compared to
busybox with this one applet.

In this case, it's 2.9 kb because
it pulls in printf machinery (for error reporting in deletions).

If this looks like a wrong metric to you,
well, there is no obvious "correct" metric for this.

If you have other applets selected, like "rm", "nuke" adds
~60 bytes of code.

I switched its default to "N".
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to