mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-11-17 01:51:00 +03:00
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 <ryao@gentoo.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #3595
This commit is contained in:
parent
6d79eabf9f
commit
9f5ba90f9f
@ -210,6 +210,12 @@ efi_get_info(int fd, struct dk_cinfo *dki_info)
|
|||||||
rval = sscanf(dev_path, "/dev/%[a-zA-Z]%hu",
|
rval = sscanf(dev_path, "/dev/%[a-zA-Z]%hu",
|
||||||
dki_info->dki_dname,
|
dki_info->dki_dname,
|
||||||
&dki_info->dki_partition);
|
&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)) {
|
} else if ((strncmp(dev_path, "/dev/dm-", 8) == 0)) {
|
||||||
strcpy(dki_info->dki_cname, "pseudo");
|
strcpy(dki_info->dki_cname, "pseudo");
|
||||||
dki_info->dki_ctype = DKC_VBD;
|
dki_info->dki_ctype = DKC_VBD;
|
||||||
|
Loading…
Reference in New Issue
Block a user