]> git.wh0rd.org - dump.git/blobdiff - restore/dirs.c
Compatibility between dumps made on little endian machines vs. big endian machines...
[dump.git] / restore / dirs.c
index abc618148d54fda14cd5795dd949c9df82b69cf7..558b2b681a6718ab6e0a8fd8e3df853c4970ddd5 100644 (file)
@@ -2,7 +2,7 @@
  *     Ported to Linux's Second Extended File System as part of the
  *     dump and restore backup suit
  *     Remy Card <card@Linux.EU.Org>, 1994-1997
- *     Stelian Pop <pop@cybercable.fr>, 1999 
+ *     Stelian Pop <pop@cybercable.fr>, 1999-2000
  */
 
 /*
@@ -45,7 +45,7 @@
 
 #ifndef lint
 static const char rcsid[] =
-       "$Id: dirs.c,v 1.6 1999/10/13 09:57:20 stelian Exp $";
+       "$Id: dirs.c,v 1.8 2000/02/10 09:42:32 stelian Exp $";
 #endif /* not lint */
 
 #include <sys/param.h>
@@ -379,10 +379,6 @@ putdir(char *buf, size_t size)
                        if (Bcvt)
                                swabst((u_char *)"is", (u_char *) dp);
                        if (oldinofmt && dp->d_ino != 0) {
-#ifdef __linux__
-                               if (Bcvt)
-                                       swabst((u_char *)"s", (u_char *)&dp->d_namlen);
-#else
 #                              if BYTE_ORDER == BIG_ENDIAN
                                        if (Bcvt)
                                                dp->d_namlen = dp->d_type;
@@ -390,16 +386,8 @@ putdir(char *buf, size_t size)
                                        if (!Bcvt)
                                                dp->d_namlen = dp->d_type;
 #                              endif
-#endif /* __linux__ */
                                dp->d_type = DT_UNKNOWN;
                        }
-#ifdef __linux__
-                       /*
-                        * Horrible hack to read FreeBSD 2.0 dumps
-                        */
-                       if (!oldinofmt)
-                               swabst((u_char *)"6bs", (u_char *) dp);
-#endif /* __linux__ */
 #ifdef DIRDEBUG
                        printf ("reclen = %d, namlen = %d, type = %d\n",
                                dp->d_reclen, dp->d_namlen, dp->d_type);