Page MenuHomeFreeBSD

D52500.id161956.diff
No OneTemporary

D52500.id161956.diff

diff --git a/stand/common/disk.c b/stand/common/disk.c
--- a/stand/common/disk.c
+++ b/stand/common/disk.c
@@ -417,7 +417,18 @@
char *cp;
struct disk_devdesc *dev;
- np = devspec + 4; /* Skip the leading 'disk' */
+ /*
+ * disks names look approximately like:
+ * v?disk([0-9]+(p[0-9]+|s[a-z])?)?:
+ * so skip over the initial bit. We don't have access to the devsw
+ * to check the name.
+ */
+ if (strncmp(devspec, "disk", 4) == 0)
+ np = devspec + 4;
+ else if (strncmp(devspec, "vdisk", 5) == 0)
+ np = devspec + 5;
+ else
+ return (EINVAL);
unit = -1;
/*
* If there is path/file info after the device info, then any missing

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 29, 3:54 AM (3 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
22425816
Default Alt Text
D52500.id161956.diff (651 B)

Event Timeline