diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c index 8d66c3b1e965..3a3958d4f8c2 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -1,4 +1,4 @@ -/* $NetBSD: dirs.c,v 1.17 1996/09/27 03:07:05 thorpej Exp $ */ +/* $NetBSD: dirs.c,v 1.18 1996/09/27 03:15:00 thorpej Exp $ */ /* * Copyright (c) 1983, 1993 @@ -42,7 +42,7 @@ #if 0 static char sccsid[] = "@(#)dirs.c 8.5 (Berkeley) 8/31/94"; #else -static char rcsid[] = "$NetBSD: dirs.c,v 1.17 1996/09/27 03:07:05 thorpej Exp $"; +static char rcsid[] = "$NetBSD: dirs.c,v 1.18 1996/09/27 03:15:00 thorpej Exp $"; #endif #endif /* not lint */ @@ -111,9 +111,9 @@ struct rstdirdesc { static long seekpt; static FILE *df, *mf; static RST_DIR *dirp; -static char dirfile[MAXPATHLEN] = "#"; /* No file */ -static char modefile[MAXPATHLEN] = "#"; /* No file */ -static char dot[2] = "."; /* So it can be modified */ +static char dirfile[32] = "#"; /* No file */ +static char modefile[32] = "#"; /* No file */ +static char dot[2] = "."; /* So it can be modified */ /* * Format of old style directories. @@ -151,13 +151,7 @@ extractdirs(genmode) struct direct nulldir; vprintf(stdout, "Extract directories from tape\n"); - (void) sprintf(dirfile, "%s/rstdir%d-XXXXXX", _PATH_TMP, dumpdate); - if (mktemp(dirfile) == NULL) { - fprintf(stderr, - "restore: %s - cannot generate directory temporary\n", - dirfile); - exit(1); - } + (void) sprintf(dirfile, "%s/rstdir%d", _PATH_TMP, dumpdate); df = fopen(dirfile, "w"); if (df == NULL) { fprintf(stderr, @@ -167,14 +161,7 @@ extractdirs(genmode) exit(1); } if (genmode != 0) { - (void) sprintf(modefile, "%s/rstmode%d-XXXXXX", _PATH_TMP, - dumpdate); - if (mktemp(modefile) == NULL) { - fprintf(stderr, - "restore: %s - cannot generate modefile\n", - modefile); - exit(1); - } + (void) sprintf(modefile, "%s/rstmode%d", _PATH_TMP, dumpdate); mf = fopen(modefile, "w"); if (mf == NULL) { fprintf(stderr,