From 9c695c61949c78901412464a69fc0ebb54782302 Mon Sep 17 00:00:00 2001 From: Kirk McKusick Date: Sat, 14 May 1983 23:46:08 -0800 Subject: [PATCH] set "terminal" to stdin when doing rrestore SCCS-vsn: sbin/restore/tape.c 3.16 --- usr/src/sbin/restore/tape.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/usr/src/sbin/restore/tape.c b/usr/src/sbin/restore/tape.c index 8615f6eac6..3762eb7ad6 100644 --- a/usr/src/sbin/restore/tape.c +++ b/usr/src/sbin/restore/tape.c @@ -1,7 +1,7 @@ /* Copyright (c) 1983 Regents of the University of California */ #ifndef lint -static char sccsid[] = "@(#)tape.c 3.15 (Berkeley) 83/05/06"; +static char sccsid[] = "@(#)tape.c 3.16 (Berkeley) 83/05/14"; #endif #include "restore.h" @@ -34,10 +34,10 @@ static int pathlen; setinput(source) char *source; { -#ifdef RRESTOR char *host; - char *index(); + terminal = stdin; +#ifdef RRESTOR host = source; magtape = index(host, ':'); if (magtape == 0) { @@ -50,9 +50,7 @@ nohost: done(1); setuid(getuid()); /* no longer need or want root privileges */ #else - if (strcmp(source, "-") != 0) { - terminal = stdin; - } else { + if (strcmp(source, "-") == 0) { /* * Since input is coming from a pipe we must establish * our own connection to the terminal. -- 2.20.1