]> git.wh0rd.org Git - dump.git/commitdiff
Fixed 'undefined file type xxx' warnings in interactive 'ls'
authorStelian Pop <stelian@popies.net>
Sun, 18 Aug 2002 20:52:04 +0000 (20:52 +0000)
committerStelian Pop <stelian@popies.net>
Sun, 18 Aug 2002 20:52:04 +0000 (20:52 +0000)
CHANGES
THANKS
dump/traverse.c

diff --git a/CHANGES b/CHANGES
index ccd47e0bd51bc6c0535bd7fcd01071cd662406b6..897451281f5f82b7284472a2d1ac9a4b52d2db61 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,4 @@
-$Id: CHANGES,v 1.192 2002/08/01 10:23:26 stelian Exp $
+$Id: CHANGES,v 1.193 2002/08/18 20:52:04 stelian Exp $
 
 Changes between versions 0.4b31 and 0.4b32 (released ?????????????)
 ===================================================================
@@ -12,6 +12,11 @@ Changes between versions 0.4b31 and 0.4b32 (released ?????????????)
        Thanks to Richard Johnson <Richard.Johnson3@ey.com> for 
        reporting the bug (originally a bugtraq post).
 
+2.     Fixed interactive 'ls' which caused spurious errors warnings
+       about 'undefined filetypes' detected. Thanks to Jorgen Ostling 
+       <jorgen_ostling@users.sourceforge.net> for reporting this 
+       bug.
+
 Changes between versions 0.4b30 and 0.4b31 (released July 30, 2002)
 ===================================================================
 
diff --git a/THANKS b/THANKS
index bf912f3d0d5e8ecdadbd5cc42c8e2c1eefb01b82..24883ace153834ec75622c84ed59cbc109eb9887 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -1,4 +1,4 @@
-$Id: THANKS,v 1.65 2002/08/01 10:23:26 stelian Exp $
+$Id: THANKS,v 1.66 2002/08/18 20:52:04 stelian Exp $
 
 Dump and restore were written by the people of the CSRG at the University
 of California, Berkeley.
@@ -73,6 +73,7 @@ Dejan Muhamedagic     dejan@quant-x.com
 Lukas Nellen           L.Nellen@ThPhys.Uni-Heidelberg.DE
 Nuno Oliveira          nuno@eq.uc.pt
 Brent Olson            night@halcyon.com
+Jorgen Ostling         jorgen_ostling@users.sourceforge.net
 Jerry Peters           gapeters@worldnet.att.net
 David B. Peterson      dave@toppledwagon.com
 Dave Platt             dplatt@snulbug.mtview.ca.us
index 6d4f00b3e910219257a3bd44ce6aff3b5997328c..116d4f3bbedfc84bff5232b8c6c1674766443301 100644 (file)
@@ -41,7 +41,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: traverse.c,v 1.49 2002/07/19 14:57:39 stelian Exp $";
+       "$Id: traverse.c,v 1.50 2002/08/18 20:52:05 stelian Exp $";
 #endif /* not lint */
 
 #include <config.h>
@@ -983,6 +983,32 @@ convert_dir(struct ext2_dir_entry *dirent, UNUSED(int offset),
        dp->d_ino = dirent->inode;
        dp->d_reclen = reclen;
        dp->d_namlen = dirent->name_len & 0xFF;
+       switch ((dirent->name_len & 0xFF00) >> 8) {
+       default:
+               dp->d_type = DT_UNKNOWN;
+               break;
+       case EXT2_FT_REG_FILE:
+               dp->d_type = DT_REG;
+               break;
+       case EXT2_FT_DIR:
+               dp->d_type = DT_DIR;
+               break;
+       case EXT2_FT_CHRDEV:
+               dp->d_type = DT_CHR;
+               break;
+       case EXT2_FT_BLKDEV:
+               dp->d_type = DT_BLK;
+               break;
+       case EXT2_FT_FIFO:
+               dp->d_type = DT_FIFO;
+               break;
+       case EXT2_FT_SOCK:
+               dp->d_type = DT_SOCK;
+               break;
+       case EXT2_FT_SYMLINK:
+               dp->d_type = DT_LNK;
+               break;
+       }
        strncpy(dp->d_name, dirent->name, dp->d_namlen);
        dp->d_name[dp->d_namlen] = '\0';
        p->prev_offset = p->offset;