From 6b8b8c7fdc750322acdeccb71f1e7bd707e01e15 Mon Sep 17 00:00:00 2001 From: Paul Saab Date: Wed, 28 Mar 2001 01:37:29 +0000 Subject: 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 --- sys/dev/ata/ata-disk.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'sys/dev/ata') diff --git a/sys/dev/ata/ata-disk.c b/sys/dev/ata/ata-disk.c index 8a4377f943cf..3531cd718879 100644 --- a/sys/dev/ata/ata-disk.c +++ b/sys/dev/ata/ata-disk.c @@ -341,21 +341,12 @@ addump(dev_t dev) DELAY(20); } - 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] "); } if (ata_wait(adp->controller, adp->unit, ATA_S_READY | ATA_S_DSC) < 0) -- cgit v1.3