summaryrefslogtreecommitdiff
path: root/ufs
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1996-04-24 18:24:17 +0000
committerMichael I. Bushnell <mib@gnu.org>1996-04-24 18:24:17 +0000
commit9edd19aad6201d9e186e74d48d72742934c1ef6b (patch)
tree9b20071e723ed8250dad9def5f0112b0a0456a11 /ufs
parent624cdda76ab25746769e7642f749e506d44fcb14 (diff)
(DIRECT_NAMLEN) [LITTLE_ENDIAN]: Deal with case correctly where it was
written without the extension on a big endian machine.
Diffstat (limited to 'ufs')
-rw-r--r--ufs/dir.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/ufs/dir.h b/ufs/dir.h
index 193e167b..1c35768a 100644
--- a/ufs/dir.h
+++ b/ufs/dir.h
@@ -90,8 +90,9 @@ struct directory_entry {
/* Return the namlen from a struct direct, paying attention to whether
this filesystem supports the type extension */
#if (BYTE_ORDER == LITTLE_ENDIAN)
-#define DIRECT_NAMLEN(dp) (direct_symlink_extension ? (dp)->d_namlen : \
- (dp)->d_type)
+#define DIRECT_NAMLEN(dp) (direct_symlink_extension || swab_disk \
+ ? (dp)->d_namlen \
+ : (dp)->(dp)->d_type)
#else
#define DIRECT_NAMLEN(dp) ((dp)->d_namlen)
#endif