Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sbin/restore Fix PR9282: restore doesn't print dump header o...



details:   https://anonhg.NetBSD.org/src/rev/c74763790410
branches:  trunk
changeset: 481375:c74763790410
user:      sommerfeld <sommerfeld%NetBSD.org@localhost>
date:      Thu Jan 27 15:25:00 2000 +0000

description:
Fix PR9282: restore doesn't print dump header on dumps from host with
unset hostname.

diffstat:

 sbin/restore/tape.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (31 lines):

diff -r 14531d31f2ca -r c74763790410 sbin/restore/tape.c
--- a/sbin/restore/tape.c       Thu Jan 27 15:11:17 2000 +0000
+++ b/sbin/restore/tape.c       Thu Jan 27 15:25:00 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tape.c,v 1.38 1999/01/03 01:50:34 lukem Exp $  */
+/*     $NetBSD: tape.c,v 1.39 2000/01/27 15:25:00 sommerfeld Exp $     */
 
 /*
  * Copyright (c) 1983, 1993
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)tape.c     8.9 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: tape.c,v 1.38 1999/01/03 01:50:34 lukem Exp $");
+__RCSID("$NetBSD: tape.c,v 1.39 2000/01/27 15:25:00 sommerfeld Exp $");
 #endif
 #endif /* not lint */
 
@@ -508,10 +508,9 @@
        fprintf(stdout, "Dump   date: %s", ctime(&spcl.c_date));
        fprintf(stdout, "Dumped from: %s",
            (spcl.c_ddate == 0) ? "the epoch\n" : ctime(&spcl.c_ddate));
-       if (spcl.c_host[0] == '\0')
-               return;
        fprintf(stderr, "Level %d dump of %s on %s:%s\n",
-               spcl.c_level, spcl.c_filesys, spcl.c_host, spcl.c_dev);
+               spcl.c_level, spcl.c_filesys, 
+               *spcl.c_host? spcl.c_host: "[unknown]", spcl.c_dev);
        fprintf(stderr, "Label: %s\n", spcl.c_label);
 }
 



Home | Main Index | Thread Index | Old Index