X-Git-Url: https://git.wh0rd.org/?p=dump.git;a=blobdiff_plain;f=dump%2Ftape.c;h=54b387eac62559d092a687ab18eca75d7a36a479;hp=0dffa3a7cba384772f087967cf0356e4236412a8;hb=88ac410d747e12ed2c1edd1ed0fdab994de71cf9;hpb=5fb6554eaf09f19f4421fdb36e04a6b6de082fe9 diff --git a/dump/tape.c b/dump/tape.c index 0dffa3a..54b387e 100644 --- a/dump/tape.c +++ b/dump/tape.c @@ -41,7 +41,7 @@ #ifndef lint static const char rcsid[] = - "$Id: tape.c,v 1.67 2002/04/11 14:51:09 stelian Exp $"; + "$Id: tape.c,v 1.68 2002/05/21 15:48:46 stelian Exp $"; #endif /* not lint */ #include @@ -542,7 +542,7 @@ trewind(void) #ifdef RDUMP if (host) { rmtclose(); - while (rmtopen(tape, 0) < 0) + while (rmtopen(tape, "O_RDONLY") < 0) sleep(10); rmtclose(); } @@ -551,7 +551,7 @@ trewind(void) { (void) close(tapefd); if (!fifoout) { - while ((f = OPEN(tape, 0)) < 0) + while ((f = OPEN(tape, O_RDONLY)) < 0) sleep (10); (void) close(f); } @@ -864,12 +864,12 @@ restore_check_point: msg("Dumping volume %d on %s\n", tapeno, tape); } #ifdef RDUMP - while ((tapefd = (host ? rmtopen(tape, 2) : pipeout ? + while ((tapefd = (host ? rmtopen(tape, "O_WRONLY|O_CREAT|O_TRUNC") : pipeout ? fileno(stdout) : - OPEN(tape, O_WRONLY|O_CREAT, 0666))) < 0) + OPEN(tape, O_WRONLY|O_CREAT|O_TRUNC, 0666))) < 0) #else while ((tapefd = (pipeout ? fileno(stdout) : - OPEN(tape, O_RDWR|O_CREAT, 0666))) < 0) + OPEN(tape, O_WRONLY|O_CREAT|O_TRUNC, 0666))) < 0) #endif { msg("Cannot open output \"%s\": %s\n", tape,