diff --git a/sbin/dump/unctime.c b/sbin/dump/unctime.c index 7b3fd4ea7cbd..bacb469aa789 100644 --- a/sbin/dump/unctime.c +++ b/sbin/dump/unctime.c @@ -32,7 +32,7 @@ */ #ifndef lint -static char sccsid[] = "@(#)unctime.c 8.1 (Berkeley) 6/5/93"; +static char sccsid[] = "@(#)unctime.c 8.2 (Berkeley) 6/14/94"; #endif /* not lint */ #include @@ -66,8 +66,6 @@ static char sccsid[] = "@(#)unctime.c 8.1 (Berkeley) 6/5/93"; #define E_SECOND 17 #define E_YEAR 20 -static int dcmp __P((struct tm *, struct tm *)); -static time_t emitl __P((struct tm *)); static int lookup __P((char *)); @@ -88,7 +86,8 @@ unctime(str) then.tm_min = atoi(&dbuf[E_MINUTE]); then.tm_sec = atoi(&dbuf[E_SECOND]); then.tm_year = atoi(&dbuf[E_YEAR]) - 1900; - return(emitl(&then)); + then.tm_isdst = -1; + return(mktime(&then)); } static char months[] = @@ -105,53 +104,3 @@ lookup(str) return((cp-months) / 3); return(-1); } -/* - * Routine to convert a localtime(3) format date back into - * a system format date. - * - * Use a binary search. - */ - -static time_t -emitl(dp) - struct tm *dp; -{ - time_t conv; - register int i, bit; - struct tm dcopy; - - dcopy = *dp; - dp = &dcopy; - conv = 0; - for (i = 30; i >= 0; i--) { - bit = 1 << i; - conv |= bit; - if (dcmp(localtime(&conv), dp) > 0) - conv &= ~bit; - } - return(conv); -} - -/* - * Compare two localtime dates, return result. - */ - -#define DECIDE(a) \ - if (dp->a > dp2->a) \ - return(1); \ - if (dp->a < dp2->a) \ - return(-1) - -static int -dcmp(dp, dp2) - register struct tm *dp, *dp2; -{ - - DECIDE(tm_year); - DECIDE(tm_mon); - DECIDE(tm_mday); - DECIDE(tm_hour); - DECIDE(tm_min); - DECIDE(tm_sec); - return(0); -} diff --git a/sbin/newlfs/extern.h b/sbin/newlfs/extern.h index c65cdba30589..27da83561bc4 100644 --- a/sbin/newlfs/extern.h +++ b/sbin/newlfs/extern.h @@ -30,15 +30,15 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)extern.h 8.1 (Berkeley) 6/5/93 + * @(#)extern.h 8.2 (Berkeley) 5/24/95 */ u_long cksum __P((void *, size_t)); u_short dkcksum __P((struct disklabel *)); void fatal __P((const char *fmt, ...)); u_int log2 __P((u_int)); -int make_lfs - __P((int, struct disklabel *, struct partition *, int, int, int)); +int make_lfs __P((int, struct disklabel *, struct partition *, int, + int, int, int)); int mkfs __P((struct partition *, char *, int, int)); extern char *progname; diff --git a/sbin/restore/restore.h b/sbin/restore/restore.h index 2202ccdc31fa..8dbcee81c01e 100644 --- a/sbin/restore/restore.h +++ b/sbin/restore/restore.h @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * @(#)restore.h 8.2 (Berkeley) 1/21/94 + * @(#)restore.h 8.3 (Berkeley) 9/13/94 */ /* @@ -53,7 +53,7 @@ extern int yflag; /* always try to recover from tape errors */ * Global variables */ extern char *dumpmap; /* map of inodes on this dump tape */ -extern char *clrimap; /* map of inodes to be deleted */ +extern char *usedinomap; /* map of inodes that are in use on this fs */ extern ino_t maxino; /* highest numbered inode in this file system */ extern long dumpnum; /* location of the dump on this tape */ extern long volno; /* current volume being read */ @@ -129,6 +129,8 @@ typedef struct rstdirdesc RST_DIR; */ #define TSTINO(ino, map) \ (map[(u_int)((ino) - 1) / NBBY] & (1 << ((u_int)((ino) - 1) % NBBY))) +#define SETINO(ino, map) \ + map[(u_int)((ino) - 1) / NBBY] |= 1 << ((u_int)((ino) - 1) % NBBY) #define dprintf if (dflag) fprintf #define vprintf if (vflag) fprintf