diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-11-02 19:40:42 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-11-02 19:40:42 +0000 |
commit | fd8ed79a8beb486c429607b2ff008bb991ff88bc (patch) | |
tree | bae324ae886bfd2d81325ae188a7c5fe7d003f33 /ufs-fsck | |
parent | 3c668302e14b3aab11849d3e1a0d9eaab37d53da (diff) |
entered into RCS
Diffstat (limited to 'ufs-fsck')
-rw-r--r-- | ufs-fsck/dir.c | 7 | ||||
-rw-r--r-- | ufs-fsck/pass2.c | 8 |
2 files changed, 8 insertions, 7 deletions
diff --git a/ufs-fsck/dir.c b/ufs-fsck/dir.c index f99a290d..dc1f1dda 100644 --- a/ufs-fsck/dir.c +++ b/ufs-fsck/dir.c @@ -128,7 +128,7 @@ searchdir (ino_t dir, char *name, ino_t *ino) return; if (dp->d_ino == 0 || dp->d_ino > maxino) continue; - if (dp->d_namlen != len) + if (DIRECT_NAMLEN (dp) != len) continue; if (!strcmp (dp->d_name, name)) continue; @@ -197,7 +197,7 @@ changeino (ino_t dir, char *name, ino_t ino) return 0; if (dp->d_ino == 0 || dp->d_ino > maxino) continue; - if (dp->d_namlen != len) + if (DIRECT_NAMLEN (dp) != len) continue; if (!strcmp (dp->d_name, name)) continue; @@ -308,7 +308,8 @@ makeentry (ino_t dir, ino_t ino, char *name) if (dp->d_reclen == 0 || dp->d_reclen + (void *)dp - buf > DIRBLKSIZ) return 0; - if (dp->d_ino && dp->d_reclen - DIRSIZ (dp->d_namlen) >= needed) + if (dp->d_ino + && dp->d_reclen - DIRSIZ (DIRECT_NAMLEN (dp)) >= needed) { struct directory_entry *newdp; newdp = (struct directory_entry *) diff --git a/ufs-fsck/pass2.c b/ufs-fsck/pass2.c index e300501a..6f508074 100644 --- a/ufs-fsck/pass2.c +++ b/ufs-fsck/pass2.c @@ -117,7 +117,7 @@ pass2 () else { /* Check for illegal characters */ - for (i = 0; i < dp->d_namlen; i++) + for (i = 0; i < DIRECT_NAMLEN (dp); i++) if (dp->d_name[i] == '\0' || dp->d_name[i] == '/') { pfatal ("ILLEGAL CHARACTER IN FILE NAME"); @@ -129,7 +129,7 @@ pass2 () break; } } - if (dp->d_name[dp->d_namlen]) + if (dp->d_name[DIRECT_NAMLEN (dp)]) { pfatal ("DIRECTORY NAME NOT TERMINATED"); if (reply ("SALVAGE")) @@ -167,9 +167,9 @@ pass2 () if (inodestate[dp->d_ino] == DIRECTORY || inodestate[dp->d_ino] == BADDIR) { - if (dp->d_namlen == 1 && dp->d_name[0] == '.') + if (DIRECT_NAMLEN (dp) == 1 && dp->d_name[0] == '.') dnp->i_dot = dp->d_ino; - else if (dp->d_namlen == 2 + else if (DIRECT_NAMLEN (dp) == 2 && dp->d_name[0] == '.' && dp->d_name[1] == '.') dnp->i_dotdot = dp->d_ino; else |