summaryrefslogtreecommitdiffstats
path: root/sbin/restore/tape.c
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/restore/tape.c')
-rw-r--r--sbin/restore/tape.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sbin/restore/tape.c b/sbin/restore/tape.c
index fcf41e8..7aae76d 100644
--- a/sbin/restore/tape.c
+++ b/sbin/restore/tape.c
@@ -583,7 +583,8 @@ extractfile(name)
skipfile();
return (GOOD);
}
- if ((ofile = creat(name, 0666)) < 0) {
+ if ((ofile = open(name, O_WRONLY | O_CREAT | O_TRUNC,
+ 0666)) < 0) {
fprintf(stderr, "%s: cannot create file: %s\n",
name, strerror(errno));
skipfile();
OpenPOWER on IntegriCloud