aboutsummaryrefslogtreecommitdiffstats
path: root/lib/libefi/rdwr_efi.c
diff options
context:
space:
mode:
authorRichard Yao <[email protected]>2015-07-14 14:28:29 -0400
committerBrian Behlendorf <[email protected]>2015-08-19 13:32:57 -0700
commit9f5ba90f9fb0aa39de35afaf6e9f385c4ddd8865 (patch)
tree26eb2b81cea3ee0111974ac78eb41635cb810369 /lib/libefi/rdwr_efi.c
parent6d79eabf9ff19b5c04fba735802b417389bdfa38 (diff)
Fix zvol detection
The zpool create subcomand should not return an error on debug builds of the userland tools when given zvols. Signed-off-by: Richard Yao <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #3595
Diffstat (limited to 'lib/libefi/rdwr_efi.c')
-rw-r--r--lib/libefi/rdwr_efi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libefi/rdwr_efi.c b/lib/libefi/rdwr_efi.c
index b3905d7f3..785cfe63b 100644
--- a/lib/libefi/rdwr_efi.c
+++ b/lib/libefi/rdwr_efi.c
@@ -210,6 +210,12 @@ efi_get_info(int fd, struct dk_cinfo *dki_info)
rval = sscanf(dev_path, "/dev/%[a-zA-Z]%hu",
dki_info->dki_dname,
&dki_info->dki_partition);
+ } else if ((strncmp(dev_path, "/dev/zd", 7) == 0)) {
+ strcpy(dki_info->dki_cname, "zd");
+ dki_info->dki_ctype = DKC_MD;
+ rval = sscanf(dev_path, "/dev/%[a-zA-Z]%hu",
+ dki_info->dki_dname,
+ &dki_info->dki_partition);
} else if ((strncmp(dev_path, "/dev/dm-", 8) == 0)) {
strcpy(dki_info->dki_cname, "pseudo");
dki_info->dki_ctype = DKC_VBD;