diff options
author | ps <ps@FreeBSD.org> | 2001-03-28 01:37:29 +0000 |
---|---|---|
committer | ps <ps@FreeBSD.org> | 2001-03-28 01:37:29 +0000 |
commit | 2f970352f7b2a33caad161f95721021750494718 (patch) | |
tree | a909572f72c677436899f7f02cab7d613a6045be /sys/dev/ida | |
parent | bffff76146178f4d1b6bbc49ac09587cfa9748cc (diff) | |
download | FreeBSD-src-2f970352f7b2a33caad161f95721021750494718.zip FreeBSD-src-2f970352f7b2a33caad161f95721021750494718.tar.gz |
Last commit was broken.. It always prints '[CTRL-C to abort]'.
Move duplicate code for printing the status of the dump and checking
for abort into a separate function.
Pointy hat to: me
Diffstat (limited to 'sys/dev/ida')
-rw-r--r-- | sys/dev/ida/ida_disk.c | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sys/dev/ida/ida_disk.c b/sys/dev/ida/ida_disk.c index d2d99f5..0aaeadc 100644 --- a/sys/dev/ida/ida_disk.c +++ b/sys/dev/ida/ida_disk.c @@ -232,22 +232,12 @@ idad_dump(dev_t dev) if (error) return (error); - if (addr % (1024 * 1024) == 0) { -#ifdef HW_WDOG - if (wdog_tickler) - (*wdog_tickler)(); -#endif - printf("%ld ", (long)(count * DEV_BSIZE)/(1024 * 1024)); - } + if (dumpstatus(addr, (long)(count * DEV_BSIZE)) < 0) + return (EINTR); blkno += blkcnt * dumppages; count -= blkcnt * dumppages; addr += PAGE_SIZE * dumppages; - - if (cncheckc() == 0x03) - return (EINTR); - else - printf("[CTRL-C to abort] "); } return (0); } |