[PATCH 3/3] commands: basename: Use posix_basename()
Sascha Hauer
s.hauer at pengutronix.de
Wed Apr 19 01:06:12 PDT 2017
The Linux shell basename command uses the POSIX basename version,
so the same for barebox.
Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
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
More information about the barebox
mailing list