[Toybox] ls implementation

Rob Landley rob at landley.net
Mon Feb 13 14:30:16 PST 2012


On 02/12/2012 02:22 PM, Andre Renaud wrote:
> Hi Rob,
> 
> On 11/02/12 00:42, Rob Landley wrote:
>> On 02/09/2012 05:18 PM, Andre Renaud wrote:
>>> Hi,
>>> Out of curiosity I had a go at implementing the 'ls' command in toybox,
>>> just to see how involved it would be. I'm not entirely sure how patch
>>> submission is done for toybox, and I'm not too familiar with mercurial,
>>> but attached is the toys/ls.c file if you're interested.
>>>
>>> It is quite limited - it only supports directories as parameters (ie:
>>> you can't do ls *.c), and only supports a couple of the ls options.
>>>
>>> Any comments?
>>
>> It looks good at first glance.  I don't have time for a proper review
>> this morning but hopefully after work I can merge it.
> 
> I've added a couple of bits to it, so that it supports ls -lFa1. The
> main thing missing is support for files in the command line (currently
> it only supports directories).
> 
> I hope non-inline attachments are ok for patches.

Cool.

Sorry for the delay evaluating it, I wanted to get a release out and you
based it on scandir() (which is in POSIX) and I have a dirtree thign
that's based on readdir(), and I wanted to compare the two and possibly
move my lib/dirtree.c stuff over to scandir(). :)

I'll try to get it checked in this evening.

Thanks,

Rob

 1329172216.0


More information about the Toybox mailing list