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:
Paul Saab 2001-03-27 06:24:08 +00:00
parent 3393f8daa3
commit f2a404d5a6
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=74841
4 changed files with 12 additions and 4 deletions

View File

@ -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] ");
}
/*

View File

@ -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)

View File

@ -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);
}

View File

@ -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);
}