Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/lib/libsa Fix a bug that libsa ls doesn't work in case o...



details:   https://anonhg.NetBSD.org/src/rev/3fd12cb9fc34
branches:  trunk
changeset: 777710:3fd12cb9fc34
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Fri Mar 02 12:08:44 2012 +0000

description:
Fix a bug that libsa ls doesn't work in case of filename with directory path.
("ls /path/and/file" always returns not found)  From MINIX via Evgeniy Ivanov.

diffstat:

 sys/lib/libsa/ls.c |  3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diffs (17 lines):

diff -r 1517da4d6de0 -r 3fd12cb9fc34 sys/lib/libsa/ls.c
--- a/sys/lib/libsa/ls.c        Fri Mar 02 11:41:36 2012 +0000
+++ b/sys/lib/libsa/ls.c        Fri Mar 02 12:08:44 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ls.c,v 1.3 2011/12/25 06:09:08 tsutsui Exp $ */
+/* $NetBSD: ls.c,v 1.4 2012/03/02 12:08:44 tsutsui Exp $ */
 
 /*-
  * Copyright (c) 2011
@@ -108,6 +108,7 @@
                fname = strrchr(path, '/');
                if (fname) {
                        size = fname - path;
+                       fname++;
                        p = alloc(size + 1);
                        if (!p)
                                goto out;



Home | Main Index | Thread Index | Old Index