Fixed a null pointer panic for dumpon(8) on a nonexistent device whose
driver uses the new disk layer. Reviewed by: phk Approved by: jkh
This commit is contained in:
parent
40a121a27c
commit
a4fcac54a1
@ -229,6 +229,8 @@ diskpsize(dev_t dev)
|
||||
if (!dp) {
|
||||
pdev = dkmodpart(dkmodslice(dev, WHOLE_DISK_SLICE), RAW_PART);
|
||||
dp = pdev->si_disk;
|
||||
if (!dp)
|
||||
return (-1);
|
||||
dev->si_drv1 = pdev->si_drv1;
|
||||
dev->si_drv2 = pdev->si_drv2;
|
||||
/* XXX: don't set bp->b_dev->si_disk (?) */
|
||||
|
Loading…
Reference in New Issue
Block a user