Considering porting acpi

Rob Landley rob at landley.net
Sun Oct 12 08:08:03 UTC 2014


On 10/10/14 01:50, Isaac Dunham wrote:
> Hello,
> I've written an acpi command for toybox, and was thinking about porting it
> to Busybox.
> What I've written is a partial clone of acpi 1.7, implementing -abctV
> (ac, battery, cooling, and thermal status; -ctV are currently living
> in a patch). I easily could add -d.
> 
> Is this likely to be interesting?
> 
> The code I have is currently using dirtree_read(), which corresponds to
> recursive_action().
> Basically it looks in /sys/class/*/*/, /sys/class/power_supply,
> and /sys/class/thermal for device status.
> I could make it shorter if I use glob() instead of a recursive callback;
> does anyone know whether glob() is likely to be a bloat problem?

The only part of busybox currently using glob() seems to be hush.c.

> Also, what would be the impact on license? It's currently "0-clause BSD".

Zero clause BSD is a public domain license. I took out the "copy this
specific license text into derived works" clause but left the permission
grants, so you can pretty much do what you like with it.

Also, you own the copyright to you own code, so you can issue any new
license terms on it you like. (This doesn't affect other licenses you've
issued to the code, they're multiple permission statements with
different wording and/or requirements to exercise the permisson to use
your copyrights.)

Also, Busybox has already sucked in more conventional BSD licensed code
before. ping.c for example has GPL at the start and BSD at the end
because separating them as much as possible makes it less obvious that
"this text blob must be copied verbatim into all derived works" might
not be entirely compatible with GPLv2 but nobody currently suing people
over it seems inclined to pursue that, so you'd have to wait for some
third party troll to inherit somebody's copyrights and try to make
trouble before that becomes an issue. But that hasn't happend since SCO
in a way I've noticed, and it's not like anybody's been successfully
sued over BSD license terms since the whole AT&T vs BSDi thing (that I
know of), so we're all acting like that's not an issue in hopes it won't be.

Heh. The ping.c one is particularly strange because clause 2,
"Redistributions in binary form must reproduce the above notice" but
busybox does not include the word "Regents" in any text string, so how
it would emit it at runtime I couldn't tell you. That said it's been
there like that for _years_ and nobody has ever cared except me.

Personally, I've stopped trying to shove camels through this particular
needle, for reasons I went over in my "Rise and Fall of Copyleft" talk
at Ohio Linuxfest last year, which expanded the three minute summary
halfway through the "What is Toybox" talk at the Embedded Linux
Conference six months earlier...

Rob


More information about the busybox mailing list