Changed cncheckc() interface so that it is 8-bit clean - return -1
instead of 0 if there is no input.
This commit is contained in:
parent
4fab2f9bc7
commit
a7f8f2ab55
@ -36,7 +36,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)kern_shutdown.c 8.3 (Berkeley) 1/21/94
|
||||
* $Id: kern_shutdown.c,v 1.6 1996/09/07 19:13:09 sos Exp $
|
||||
* $Id: kern_shutdown.c,v 1.7 1996/09/13 09:17:06 bde Exp $
|
||||
*/
|
||||
|
||||
#include "opt_ddb.h"
|
||||
@ -245,7 +245,8 @@ boot(howto)
|
||||
PANIC_REBOOT_WAIT_TIME);
|
||||
for (loop = PANIC_REBOOT_WAIT_TIME * 10; loop > 0; --loop) {
|
||||
DELAY(1000 * 100); /* 1/10th second */
|
||||
if (cncheckc()) /* Did user type a key? */
|
||||
/* Did user type a key? */
|
||||
if (cncheckc() != -1)
|
||||
break;
|
||||
}
|
||||
if (!loop)
|
||||
|
@ -14,7 +14,7 @@
|
||||
*
|
||||
* Ported to run under 386BSD by Julian Elischer (julian@dialix.oz.au) Sept 1992
|
||||
*
|
||||
* $Id: sd.c,v 1.93 1996/09/03 10:24:29 asami Exp $
|
||||
* $Id: sd.c,v 1.94 1996/09/06 23:09:18 phk Exp $
|
||||
*/
|
||||
|
||||
#include "opt_bounce.h"
|
||||
@ -921,7 +921,7 @@ sddump(dev_t dev)
|
||||
addr = (char *) 0; /* starting address */
|
||||
|
||||
/* toss any characters present prior to dump */
|
||||
while (cncheckc())
|
||||
while (cncheckc() != -1)
|
||||
;
|
||||
|
||||
/* size of memory to dump */
|
||||
@ -1020,7 +1020,7 @@ sddump(dev_t dev)
|
||||
(int) addr += SECSIZE * blkcnt;
|
||||
|
||||
/* operator aborting dump? */
|
||||
if (cncheckc())
|
||||
if (cncheckc() != -1)
|
||||
return (EINTR);
|
||||
}
|
||||
return (0);
|
||||
|
Loading…
Reference in New Issue
Block a user