aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sbin/bsdlabel/bsdlabel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/sbin/bsdlabel/bsdlabel.c b/sbin/bsdlabel/bsdlabel.c
index 8d44e6878df0..3d12834f6030 100644
--- a/sbin/bsdlabel/bsdlabel.c
+++ b/sbin/bsdlabel/bsdlabel.c
@@ -222,6 +222,9 @@ main(int argc, char *argv[])
} else if (argv[0][0] != '/') {
dkname = argv[0];
asprintf(&specname, "%s%s", _PATH_DEV, argv[0]);
+ } else if (strncmp(argv[0], _PATH_DEV, strlen(_PATH_DEV)) == 0) {
+ dkname = argv[0] + strlen(_PATH_DEV);
+ specname = argv[0];
} else {
dkname = strrchr(argv[0], '/');
dkname++;