diff options
author | Richard Yao <[email protected]> | 2015-07-06 11:20:11 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-07-10 12:21:14 -0700 |
commit | 541da9935d07ad40fb5e000114d9c904c2dde632 (patch) | |
tree | 53b4f8fb4a181b01b319cc51b2666eb89481372f /lib/libefi | |
parent | 98cb3a76559cb1187f77af1d6a08d4f9b7b14aa0 (diff) |
Fix Xen Virtual Block Device detection
We fail to make partitions on xvd (Xen Virtual Block) devices. This also
causes debug builds of zpool create to return an error when given xen
virtual block devices. These devices should be given the same treatment
as vd (KVM Virtual Block) devices, so we adjust the relevant code paths.
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3576
Diffstat (limited to 'lib/libefi')
-rw-r--r-- | lib/libefi/rdwr_efi.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libefi/rdwr_efi.c b/lib/libefi/rdwr_efi.c index 24ec365b5..b3905d7f3 100644 --- a/lib/libefi/rdwr_efi.c +++ b/lib/libefi/rdwr_efi.c @@ -204,6 +204,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/xvd", 8) == 0)) { + strcpy(dki_info->dki_cname, "xvd"); + 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; |