git://git.camperquake.de
/
zfs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b97f368
)
Treat /dev/vd* as whole disks
author
Richard Laager
<rlaager@wiktel.com>
Mon, 9 Jan 2012 22:50:26 +0000
(16:50 -0600)
committer
Brian Behlendorf
<behlendorf1@llnl.gov>
Thu, 12 Jan 2012 00:44:54 +0000
(16:44 -0800)
Correctly detect /dev/vd devices as whole disks and attempt to
create an EFI partition table.
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
lib/libefi/rdwr_efi.c
patch
|
blob
|
history
diff --git
a/lib/libefi/rdwr_efi.c
b/lib/libefi/rdwr_efi.c
index
43a5310
..
c317d24
100644
(file)
--- 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;