[Toybox] default ls behavior on a broken symlink

Rob Landley rob at landley.net
Tue Nov 14 01:34:55 PST 2017


On 11/13/2017 04:14 PM, Ryan Prichard wrote:
> I noticed that Toybox's ls prints a "No such file or directory" error
> for a broken symlink, whereas GNU coreutils and FreeBSD's ls instead
> print the name of the symlink successfully. Is this considered a bug in
> Toybox?

$ ln -s nothere blah2
$ toybox ls -l blah2
lrwxrwxrwx 1 landley landley 7 2017-11-14 03:25 blah2 -> nothere
$ toybox ls | grep blah2
blah2
$ toybox ls blah2
ls: blah2: No such file or directory

Yeah, that's inconsistent. I have a dinner appointment with the openrisc
kernel maintainer in twenty minutes (tokyo!), but I'll try to come up
with a fix afterwards or in the morning.

Thanks,

Rob



More information about the Toybox mailing list