Considering porting acpi

Isaac Dunham ibid.ag at gmail.com
Fri Oct 10 15:43:15 UTC 2014


On Fri, Oct 10, 2014 at 01:46:36PM +0100, Steven Honeyman wrote:
> On Friday 10 October 2014 06:50:49, Isaac Dunham wrote:
> > Is this likely to be interesting?
> 
> To me it would be... although I already wrote my own implementation;
> if the developers don't ignore you and it gets added, it'd be 1 less
> patch I'd have to use each build :)

OK, I'll port it. 

> > 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?
> 
> There's a cut-down glob function you could borrow from the linux
> kernel ( lib/glob.c ) if you really wanted it slim.

That would make a smaller static binary where only the "acpi" applet is
concerned, but it might well increase the net size; glob uses fnmatch,
which is use in several parts of busybox.

This reminds me: I keep thinking about writing "fngrep", a grep-like
tool that uses fnmatch instead of regexes. Not widely useful, perhaps
on occasion.

> Off-topic slightly; Issac - am I right in thinking I've seen your name
> in relation to Puppy Linux somewhere? Do you know if someone by the
> name "technosaurus" is still around?

Yes; that's how I started modifying busybox originally. (By the way,
the name's Isaac not Issac.)
"Technosaurus" is still around--he wrote blkid/fstype and mixer for
toybox; last I heard, he was considering a "Puppy BSD" and had been
working on some tiny project with a permissively licensed userland.

> 
> Thanks,
> Steven


More information about the busybox mailing list