aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd/zdb/zdb.c
diff options
context:
space:
mode:
Diffstat (limited to 'cddl/contrib/opensolaris/cmd/zdb/zdb.c')
-rw-r--r--cddl/contrib/opensolaris/cmd/zdb/zdb.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zdb/zdb.c b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
index bb45b5e90d80..64e5cbd38854 100644
--- a/cddl/contrib/opensolaris/cmd/zdb/zdb.c
+++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
@@ -2156,10 +2156,11 @@ dump_label(const char *dev)
uint64_t psize, ashift;
int len = strlen(dev) + 1;
- if (strncmp(dev, "/dev/dsk/", 9) == 0) {
+ if (strncmp(dev, ZFS_DISK_ROOTD, strlen(ZFS_DISK_ROOTD)) == 0) {
len++;
path = malloc(len);
- (void) snprintf(path, len, "%s%s", "/dev/rdsk/", dev + 9);
+ (void) snprintf(path, len, "%s%s", ZFS_RDISK_ROOTD,
+ dev + strlen(ZFS_DISK_ROOTD));
} else {
path = strdup(dev);
}