Change the dump routines to only abort if control-c is pressed.
If any other key is pressed, print a message stating that control-c is how to abort. Reviewed by: peter
This commit is contained in:
parent
3393f8daa3
commit
f2a404d5a6
@ -736,8 +736,10 @@ dadump(dev_t dev)
|
||||
addr += PAGE_SIZE * dumppages;
|
||||
|
||||
/* operator aborting dump? */
|
||||
if (cncheckc() != -1)
|
||||
if (cncheckc() == 0x03)
|
||||
return (EINTR);
|
||||
else
|
||||
printf("[CTRL-C to abort] ");
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -352,8 +352,10 @@ addump(dev_t dev)
|
||||
blkno += blkcnt * dumppages;
|
||||
count -= blkcnt * dumppages;
|
||||
addr += PAGE_SIZE * dumppages;
|
||||
if (cncheckc() != -1)
|
||||
if (cncheckc() == 0x03)
|
||||
return EINTR;
|
||||
else
|
||||
printf("[CTRL-C to abort] ");
|
||||
}
|
||||
|
||||
if (ata_wait(adp->controller, adp->unit, ATA_S_READY | ATA_S_DSC) < 0)
|
||||
|
@ -244,8 +244,10 @@ idad_dump(dev_t dev)
|
||||
count -= blkcnt * dumppages;
|
||||
addr += PAGE_SIZE * dumppages;
|
||||
|
||||
if (cncheckc() != -1)
|
||||
if (cncheckc() == 0x03)
|
||||
return (EINTR);
|
||||
else
|
||||
printf("[CTRL-C to abort] ");
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
@ -741,8 +741,10 @@ twed_dump(dev_t dev)
|
||||
count -= blkcnt * dumppages;
|
||||
addr += PAGE_SIZE * dumppages;
|
||||
|
||||
if (cncheckc() != -1)
|
||||
if (cncheckc() == 0x03)
|
||||
return(EINTR);
|
||||
else
|
||||
printf("[CTRL-C to abort] ");
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user