summaryrefslogtreecommitdiff
path: root/ufs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-04-24 18:26:16 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-04-24 18:26:16 +0000
commitec399f410b97ee533197c082036f16906060ed5e (patch)
tree4cfab55d6d4c8045ffb62c05fabba3d1555d8ef3 /ufs
parent9edd19aad6201d9e186e74d48d72742934c1ef6b (diff)
(DIRECT_NAMLEN) [! LITTLE_ENDIAN]: Deal correctly with the case where
it was written on a little endian machine without the extension.
Diffstat (limited to 'ufs')
-rw-r--r--ufs/dir.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/ufs/dir.h b/ufs/dir.h
index 1c35768a..2b1e3469 100644
--- a/ufs/dir.h
+++ b/ufs/dir.h
@@ -92,9 +92,11 @@ struct directory_entry {
#if (BYTE_ORDER == LITTLE_ENDIAN)
#define DIRECT_NAMLEN(dp) (direct_symlink_extension || swab_disk \
? (dp)->d_namlen \
- : (dp)->(dp)->d_type)
+ : (dp)->d_type)
#else
-#define DIRECT_NAMLEN(dp) ((dp)->d_namlen)
+#define DIRECT_NAMLEN(dp) (!direct_symlink_extension && swab_disk \
+ ? (dp)->d_type \
+ : (dp)->d_namlen)
#endif
/*