[comp.bugs.4bsd] etc/restore prints the epoch date rather than ``the epoch'' +Fix

gww@marduk.UUCP (Gary Winiger) (09/05/87)

Subject: Restore prints the epoch date when restoring an epoch dump. +Fix
Index:	etc/restore/tape.c 4.3BSD +Fix

Description:
	When restore lists the dates the the dump encompases such as with
	the -t option, it will list the epoch date for the from date of a
	level 0 dump.
Repeat-By:
	/etc/restore -t
Fix:
	The attached code resolves this problem at Elxsi.

Gary..
{ucbvax!sun,lll-lcc!lll-tis,amdahl!altos86,bridge2}!elxsi!gww
--------- cut --------- snip --------- :.,$w diff -------------
*** /tmp/,RCSt1001142	Wed Apr  1 13:38:43 1987
--- tape.c	Wed Apr  1 13:38:13 1987
***************
*** 1,5 ****
--- 1,8 ----
  /*
   * $Log:	tape.c,v $
+  * Revision 1.2  87/04/01  13:37:15  gww
+  * Report tape dumped from the epoch when it is rather than the epoch date.
+  * 
   * Revision 1.1  87/04/01  13:33:36  gww
   * Initial revision
   * 
***************
*** 11,17 ****
   */
  
  #ifndef lint
! static char *ERcsId = "$Header: tape.c,v 1.1 87/04/01 13:33:36 gww Exp $ ENIX BSD";
  static char sccsid[] = "@(#)tape.c	5.6 (Berkeley) 5/2/86";
  #endif not lint
  
--- 14,20 ----
   */
  
  #ifndef lint
! static char *ERcsId = "$Header: tape.c,v 1.2 87/04/01 13:37:15 gww Exp $ ENIX BSD";
  static char sccsid[] = "@(#)tape.c	5.6 (Berkeley) 5/2/86";
  #endif not lint
  
***************
*** 160,166 ****
  	}
  	if (vflag || command == 't') {
  		fprintf(stdout, "Dump   date: %s", ctime(&spcl.c_date));
! 		fprintf(stdout, "Dumped from: %s", ctime(&spcl.c_ddate));
  	}
  	dumptime = spcl.c_ddate;
  	dumpdate = spcl.c_date;
--- 163,170 ----
  	}
  	if (vflag || command == 't') {
  		fprintf(stdout, "Dump   date: %s", ctime(&spcl.c_date));
! 		fprintf(stdout, "Dumped from: %s", 
! 			(spcl.c_ddate == (time_t)0) ? "the epoch\n" : ctime(&spcl.c_ddate));
  	}
  	dumptime = spcl.c_ddate;
  	dumpdate = spcl.c_date;