When dumping to a unpartitioned disk, make sure to chop the
length of the dump area accordingly. Run into by: scottl
This commit is contained in:
parent
1e48d031c9
commit
3ad9f7c2c5
@ -180,6 +180,8 @@ g_disk_kerneldump(struct bio *bp, struct disk *dp)
|
||||
di.priv = dp;
|
||||
di.blocksize = dp->d_sectorsize;
|
||||
di.mediaoffset = gkd->offset;
|
||||
if ((gkd->offset + gkd->length) > dp->d_mediasize)
|
||||
gkd->length = dp->d_mediasize - gkd->offset;
|
||||
di.mediasize = gkd->length;
|
||||
error = set_dumper(&di);
|
||||
g_io_deliver(bp, error);
|
||||
|
Loading…
Reference in New Issue
Block a user