Hi, A small fix for ls is in attachment. The pattern (fname) shouldn't include '/'.
On Fri, Feb 3, 2012 at 12:48 AM, Evgeniy Ivanov <lolkaanti...@gmail.com> wrote: > On Sun, Dec 25, 2011 at 11:54 AM, Evgeniy Ivanov <lolkaanti...@gmail.com> > wrote: >> Hi, >> >> On Sun, Dec 25, 2011 at 10:20 AM, Izumi Tsutsui <tsut...@ceres.dti.ne.jp> >> wrote: >>> Hi, >>> >>> Evgeniy Ivanov wrote: >>> >>>> Izumi, thank you for reviewing! New patches are attached. >>> : >>>> > I think it's better to use a positive LIBSA_ENABLE_LS_OP option rather >>>> > than LIBSA_NO_LS_OP, and make whole (fs_ops)->ls op part optional because >>>> > - there are many primary bootloaders (bootxx_foo) which don't need >>>> > the ls op and have size restrictions (alpha, atari, pmax ...) >>>> > - there are few bootloaders which support command prompt mode where >>>> > the `ls' op is actually required (some ports don't have even getchar()) >>>> >>>> Done. >>>> >>>> > We also have to check all other non-x86 bootloaders which refer ufs_ls(). >>>> > (ews4800mips, ia64, landisk, x68k, zaurus etc) >>>> >>>> Done. I'm not able to check though, but the modification is trivial >>>> and almost the same as for i386. >>> >>> Committed all changes (with several fixes for ews4800mips and x68k) >>> http://mail-index.NetBSD.org/source-changes/2011/12/25/msg029999.html >> >> Great! >> >>> Thank you for your great work! >> >> np :-) >> >>> Now it's time for someone[TM] to try PR/30866 :-) >>> http://gnats.NetBSD.org/30866 >> >> Seems to be a useful feature, I'll work on this in Jan if it doesn't >> violate [TM] :P > > Unfortunately I was out of time and doubtfully will get some time for > this soon... > So anybody is welcome to work on this feature. > > > > -- > Evgeniy -- Evgeniy
--- sys/lib/libsa/ls_old.c 2012-02-06 22:22:52.762000008 +0400 +++ sys/lib/libsa/ls.c 2012-02-06 22:23:11.308999999 +0400 @@ -108,6 +108,7 @@ ls(const char *path) fname = strrchr(path, '/'); if (fname) { size = fname - path; + fname++; p = alloc(size + 1); if (!p) goto out;