From b2e4a00210c9bbf512d25180525411eaef49e4a3 Mon Sep 17 00:00:00 2001 From: joerg Date: Tue, 6 May 1997 20:52:28 +0000 Subject: [PATCH] Fix a long-standing bug with dump not treating errors correctly. They were mishandled as an EOF, which became fatal if your first tape was accidentally write-protected. PR: bin/850 dump treats write-protect as an EOT... --- sbin/dump/tape.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index 9378d9fd1be3..91f5dc4f687e 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -722,8 +722,10 @@ killall() register int i; for (i = 0; i < SLAVES; i++) - if (slaves[i].pid > 0) + if (slaves[i].pid > 0) { (void) kill(slaves[i].pid, SIGKILL); + slaves[i].sent = 0; + } } /* @@ -818,7 +820,7 @@ doslave(cmd, slave_number) * fixme: Pyramids running OSx return ENOSPC * at EOT on 1/2 inch drives. */ - if (size < 0) { + if (wrote < 0) { (void) kill(master, SIGUSR1); for (;;) (void) sigpause(0);