summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorAlexander Hall <halex@cvs.openbsd.org>2012-08-22 05:20:52 +0000
committerAlexander Hall <halex@cvs.openbsd.org>2012-08-22 05:20:52 +0000
commitc50f1dcc751b28380e3c4e7b088c574e864c4a34 (patch)
treed947534808df0d03605ac4bee031cdcb5595ddac /sbin
parentc6ae3f45443fa23e8cf51ad53aa5f5f91d5f485f (diff)
- open a remote file/device with the same flags we use when opening a
local one - replace a few magic numbers with the appropriate constants ok millert@ (pre-lock)
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dump/tape.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c
index f87dbf7cc08..0f4e60d757b 100644
--- a/sbin/dump/tape.c
+++ b/sbin/dump/tape.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tape.c,v 1.31 2009/10/27 23:59:32 deraadt Exp $ */
+/* $OpenBSD: tape.c,v 1.32 2012/08/22 05:20:51 halex Exp $ */
/* $NetBSD: tape.c,v 1.11 1997/06/05 11:13:26 lukem Exp $ */
/*-
@@ -387,7 +387,7 @@ trewind(void)
#ifdef RDUMP
if (host) {
rmtclose();
- while (rmtopen(tape, 0) < 0)
+ while (rmtopen(tape, O_RDONLY) < 0)
sleep(10);
rmtclose();
return;
@@ -410,7 +410,7 @@ trewind(void)
}
(void) close(tapefd);
- while ((f = open(tape, 0)) < 0)
+ while ((f = open(tape, O_RDONLY)) < 0)
sleep (10);
(void) close(f);
}
@@ -649,7 +649,7 @@ restore_check_point:
msg("Dumping volume %d on %s\n", tapeno, tape);
}
#ifdef RDUMP
- while ((tapefd = (host ? rmtopen(tape, 2) :
+ while ((tapefd = (host ? rmtopen(tape, O_WRONLY|O_CREAT) :
pipeout ? 1 : open(tape, O_WRONLY|O_CREAT, 0666))) < 0)
#else
while ((tapefd = (pipeout ? 1 :