summaryrefslogtreecommitdiffstats
path: root/lib/libefi
diff options
context:
space:
mode:
authorRichard Laager <[email protected]>2012-01-09 16:50:26 -0600
committerBrian Behlendorf <[email protected]>2012-01-11 16:44:54 -0800
commit2932b6a8004df8417036894d7d2e7e151cc95434 (patch)
tree3bde6f7104b1500b92fe1c15adc22e038f00994c /lib/libefi
parentb97f368d047943607b5b263331d7e2075ab3ffe8 (diff)
Treat /dev/vd* as whole disks
Correctly detect /dev/vd devices as whole disks and attempt to create an EFI partition table. Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'lib/libefi')
-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 43a5310a3..c317d24f8 100644
--- a/lib/libefi/rdwr_efi.c
+++ b/lib/libefi/rdwr_efi.c
@@ -196,6 +196,12 @@ efi_get_info(int fd, struct dk_cinfo *dki_info)
rval = sscanf(dev_path, "/dev/%[a-zA-Z0-9]p%hu",
dki_info->dki_dname,
&dki_info->dki_partition);
+ } else if ((strncmp(dev_path, "/dev/vd", 7) == 0)) {
+ strcpy(dki_info->dki_cname, "vd");
+ 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;