aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/extattr
diff options
context:
space:
mode:
authorRobert Watson <rwatson@FreeBSD.org>2002-10-10 16:37:12 +0000
committerRobert Watson <rwatson@FreeBSD.org>2002-10-10 16:37:12 +0000
commit7522ecb37f67280cfd594b2c365130add6c26229 (patch)
tree5fbe80ad8b7941fdd81ad643f8410fa44df5cb28 /usr.sbin/extattr
parentd61e0656e12449935da4606d58775b383a8dacc7 (diff)
downloadsrc-7522ecb37f67280cfd594b2c365130add6c26229.tar.gz
src-7522ecb37f67280cfd594b2c365130add6c26229.zip
Notes
Diffstat (limited to 'usr.sbin/extattr')
-rw-r--r--usr.sbin/extattr/rmextattr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/extattr/rmextattr.c b/usr.sbin/extattr/rmextattr.c
index 79cd163bc1ce..e240232a4f7a 100644
--- a/usr.sbin/extattr/rmextattr.c
+++ b/usr.sbin/extattr/rmextattr.c
@@ -40,6 +40,7 @@
#include <sys/uio.h>
#include <sys/extattr.h>
+#include <libgen.h>
#include <libutil.h>
#include <stdio.h>
#include <stdlib.h>
@@ -111,7 +112,7 @@ main(int argc, char *argv[])
visbuflen = buflen = 0;
visbuf = buf = NULL;
- p = strrchr(argv[0], '/');
+ p = basename(argv[0]);
if (p == NULL)
p = argv[0];
if (!strcmp(p, "getextattr")) {