use d_fileno instead of d_ino for consistency

This commit is contained in:
christos 2005-08-19 06:44:06 +00:00
parent 4ce7529a64
commit 982d8230de
1 changed files with 8 additions and 8 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: interactive.c,v 1.23 2005/08/19 02:07:19 christos Exp $ */
/* $NetBSD: interactive.c,v 1.24 2005/08/19 06:44:06 christos Exp $ */
/*
* Copyright (c) 1985, 1993
@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)interactive.c 8.5 (Berkeley) 5/1/95";
#else
__RCSID("$NetBSD: interactive.c,v 1.23 2005/08/19 02:07:19 christos Exp $");
__RCSID("$NetBSD: interactive.c,v 1.24 2005/08/19 06:44:06 christos Exp $");
#endif
#endif /* not lint */
@ -726,14 +726,14 @@ glob_readdir(RST_DIR *dirp)
static struct dirent adirent;
while ((dp = rst_readdir(dirp)) != NULL) {
if (!vflag && dp->d_ino == WINO)
if (!vflag && dp->d_fileno == WINO)
continue;
if (dflag || TSTINO(dp->d_ino, dumpmap))
if (dflag || TSTINO(dp->d_fileno, dumpmap))
break;
}
if (dp == NULL)
return (NULL);
adirent.d_fileno = dp->d_ino;
adirent.d_fileno = dp->d_fileno;
adirent.d_namlen = dp->d_namlen;
memmove(adirent.d_name, dp->d_name, dp->d_namlen + 1);
return (&adirent);
@ -748,10 +748,10 @@ glob_stat(const char *name, struct stat *stp)
struct direct *dp;
dp = pathsearch(name);
if (dp == NULL || (!dflag && TSTINO(dp->d_ino, dumpmap) == 0) ||
(!vflag && dp->d_ino == WINO))
if (dp == NULL || (!dflag && TSTINO(dp->d_fileno, dumpmap) == 0) ||
(!vflag && dp->d_fileno == WINO))
return (-1);
if (inodetype(dp->d_ino) == NODE)
if (inodetype(dp->d_fileno) == NODE)
stp->st_mode = S_IFDIR;
else
stp->st_mode = S_IFREG;