From 490dc8aaa3f8ff1dd78d580d1061fc349896e689 Mon Sep 17 00:00:00 2001 From: imp Date: Fri, 25 Mar 2005 06:57:50 +0000 Subject: dcvt is unused since the support for converting pre-4.4 tapes was removed. Go ahead and remove it and struct odirent since it too is unused. # FreeBSD 1.1.5 tapes are still unreadable, but 2.0 and newer work. --- sbin/restore/Makefile | 1 + sbin/restore/dirs.c | 27 ++------------------------- 2 files changed, 3 insertions(+), 25 deletions(-) (limited to 'sbin/restore') diff --git a/sbin/restore/Makefile b/sbin/restore/Makefile index c06a3db..266a5de 100644 --- a/sbin/restore/Makefile +++ b/sbin/restore/Makefile @@ -6,6 +6,7 @@ PROG= restore LINKS= ${BINDIR}/restore ${BINDIR}/rrestore CFLAGS+=-DRRESTORE +CFLAGS+=-g WARNS?= 0 SRCS= main.c interactive.c restore.c dirs.c symtab.c tape.c utilities.c \ dumprmt.c diff --git a/sbin/restore/dirs.c b/sbin/restore/dirs.c index 327d3ed..ee37113 100644 --- a/sbin/restore/dirs.c +++ b/sbin/restore/dirs.c @@ -109,17 +109,7 @@ static char dirfile[MAXPATHLEN] = "#"; /* No file */ static char modefile[MAXPATHLEN] = "#"; /* No file */ static char dot[2] = "."; /* So it can be modified */ -/* - * Format of old style directories. - */ -#define ODIRSIZ 14 -struct odirect { - u_short d_ino; - char d_name[ODIRSIZ]; -}; - static struct inotab *allocinotab(struct context *, long); -static void dcvt(struct odirect *, struct direct *); static void flushent(void); static struct inotab *inotablookup(ino_t); static RST_DIR *opendirfile(const char *); @@ -288,6 +278,8 @@ pathsearch(const char *pathname) struct direct *dp; char *path, *name, buffer[MAXPATHLEN]; + printf("Looking for %s\n", pathname); + strcpy(buffer, pathname); path = buffer; ino = ROOTINO; @@ -332,9 +324,6 @@ searchdir(ino_t inum, char *name) static void putdir(char *buf, long size) { - struct direct cvtbuf; - struct odirect *odp; - struct odirect *eodp; struct direct *dp; long loc, i; @@ -412,18 +401,6 @@ flushent(void) dirloc = 0; } -static void -dcvt(struct odirect *odp, struct direct *ndp) -{ - - memset(ndp, 0, (long)(sizeof *ndp)); - ndp->d_ino = odp->d_ino; - ndp->d_type = DT_UNKNOWN; - (void) strncpy(ndp->d_name, odp->d_name, ODIRSIZ); - ndp->d_namlen = strlen(ndp->d_name); - ndp->d_reclen = DIRSIZ(0, ndp); -} - /* * Seek to an entry in a directory. * Only values returned by rst_telldir should be passed to rst_seekdir. -- cgit v1.1