Skip to content

Commit

Permalink
Treat /dev/vd* as whole disks
Browse files Browse the repository at this point in the history
Correctly detect /dev/vd devices as whole disks and attempt to
create an EFI partition table.

Signed-off-by: Brian Behlendorf <[email protected]>
  • Loading branch information
rlaager authored and behlendorf committed Jan 12, 2012
1 parent b97f368 commit 2932b6a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/libefi/rdwr_efi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 2932b6a

Please sign in to comment.