/*
* XXX should clean up checking in dumpsys() to be more like this.
*/
newdumplo = psize - Maxmem * PAGE_SIZE / DEV_BSIZE;
newdumplo = psize - (Maxmem + 2) * PAGE_SIZE / DEV_BSIZE;
if (newdumplo < 0)
return (ENOSPC);
dumpdev = dev;
dl = dsgetlabel(dev, dp->d_slice);
if (!dl)
return (ENXIO);
*count = (u_long)Maxmem * PAGE_SIZE / dl->d_secsize;
*count = (u_long)(Maxmem + 2) * PAGE_SIZE / dl->d_secsize;
if (dumplo < 0 ||
(dumplo + *count > dl->d_partitions[dkpart(dev)].p_size))
return (EINVAL);