[PATCH 3/3] commands: basename: Use posix_basename()

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

 



The Linux shell basename command uses the POSIX basename version,
so the same for barebox.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
---
 commands/basename.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/commands/basename.c b/commands/basename.c
index 028b0e0f24..c1a28e9e1d 100644
--- a/commands/basename.c
+++ b/commands/basename.c
@@ -27,7 +27,7 @@ static int do_basename(int argc, char *argv[])
 	if (argc != 3)
 		return COMMAND_ERROR_USAGE;
 
-	setenv(argv[2], basename(argv[1]));
+	setenv(argv[2], posix_basename(argv[1]));
 
 	return 0;
 }
-- 
2.11.0


_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux