X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=dump%2Ftraverse.c;h=f149b120b13555d31245e7fc9f09ea61d94cde84;hb=d6f78b132d0cce9af4090f2938771ec9c9e6deb3;hp=a95a21e1be07da8a6d1244db0c89822cbfe2a896;hpb=7fbb9b02f47a159786b43d30d4f6901a742aafa6;p=dump.git diff --git a/dump/traverse.c b/dump/traverse.c index a95a21e..f149b12 100644 --- a/dump/traverse.c +++ b/dump/traverse.c @@ -2,7 +2,7 @@ * Ported to Linux's Second Extended File System as part of the * dump and restore backup suit * Remy Card , 1994-1997 - * Stelian Pop , 1999 + * Stelian Pop , 1999-2000 */ /*- @@ -40,7 +40,7 @@ #ifndef lint static const char rcsid[] = - "$Id: traverse.c,v 1.11 1999/12/05 18:21:23 tiniou Exp $"; + "$Id: traverse.c,v 1.14 2000/01/21 10:17:41 stelian Exp $"; #endif /* not lint */ #include @@ -283,9 +283,9 @@ mapfilesindir(struct ext2_dir_entry *dirent, int offset, int blocksize, char *bu dp = getino(dirent->inode); mode = dp->di_mode & IFMT; if (mode == IFDIR && dp->di_nlink != 0 && dp->di_dtime == 0) { - if ((dirent->name[0] != '.' || dirent->name_len != 1) && + if ((dirent->name[0] != '.' || ( dirent->name_len & 0xFF ) != 1) && (dirent->name[0] != '.' || dirent->name[1] != '.' || - dirent->name_len != 2)) { + ( dirent->name_len & 0xFF ) != 2)) { retval = ext2fs_dir_iterate(fs, ino, 0, NULL, mapfilesindir, private); if (retval) @@ -516,9 +516,9 @@ searchdir(struct ext2_dir_entry *dp, int offset, int blocksize, char *buf, void if (dp->inode == 0) return 0; if (dp->name[0] == '.') { - if (dp->name_len == 1) + if (( dp->name_len & 0xFF ) == 1) return 0; - if (dp->name[1] == '.' && dp->name_len == 2) + if (dp->name[1] == '.' && ( dp->name_len & 0xFF ) == 2) return 0; } if (mdc->nodump) { @@ -667,7 +667,7 @@ dumpino(struct dinode *dp, ino_t ino) obi.di_gen = dp->di_gen; memmove(&obi.di_db, &dp->di_db, (NDADDR + NIADDR) * sizeof(daddr_t)); if (dp->di_file_acl || dp->di_dir_acl) - warn("ACLs in inode #%ld won't be dumped", ino); + warn("ACLs in inode #%ld won't be dumped", (long)ino); memmove(&spcl.c_dinode, &obi, sizeof(obi)); #else /* __linux__ */ spcl.c_dinode = *dp; @@ -850,7 +850,7 @@ dumpdirino(struct dinode *dp, ino_t ino) /* Do the conversion */ retval = ext2fs_dir_iterate(fs, ino, 0, NULL, convert_dir, (void *)&cdc); if (retval) { - com_err(disk, retval, "while converting directory #%ld\n", ino); + com_err(disk, retval, "while converting directory #%ld\n", (long)ino); exit(X_ABORT); } /* Fix the last entry */ @@ -877,7 +877,7 @@ dumpdirino(struct dinode *dp, ino_t ino) obi.di_gen = dp->di_gen; memmove(&obi.di_db, &dp->di_db, (NDADDR + NIADDR) * sizeof(daddr_t)); if (dp->di_file_acl || dp->di_dir_acl) - warn("ACLs in inode #%ld won't be dumped", ino); + warn("ACLs in inode #%ld won't be dumped", (long)ino); memmove(&spcl.c_dinode, &obi, sizeof(obi)); #else /* __linux__ */ spcl.c_dinode = *dp;