summaryrefslogtreecommitdiffstats
path: root/sys/fs/ext2fs/ext2_inode_cnv.c
diff options
context:
space:
mode:
authorpfg <pfg@FreeBSD.org>2012-12-20 02:22:36 +0000
committerpfg <pfg@FreeBSD.org>2012-12-20 02:22:36 +0000
commit16216f308ecbecf894004a7d4d7146e513c243ee (patch)
tree7e249026a8f2bd6c706a47b52d4bcd0094a9cb83 /sys/fs/ext2fs/ext2_inode_cnv.c
parent90acfcf07cafd583658a435ebeb7f49822941299 (diff)
downloadFreeBSD-src-16216f308ecbecf894004a7d4d7146e513c243ee.zip
FreeBSD-src-16216f308ecbecf894004a7d4d7146e513c243ee.tar.gz
More constant renaming in preparation for newer features.
We also try to make better use of the fs flags instead of trying adapt the code according to the fs structures. In the case of subsecond timestamps and birthtime we now check that the feature is explicitly enabled: previously we only checked that the reserved space was available and silently wrote them. This approach is much safer, especially if the filesystem happens to use embedded inodes or support EAs. Discussed with: Zheng Liu MFC after: 5 days
Diffstat (limited to 'sys/fs/ext2fs/ext2_inode_cnv.c')
-rw-r--r--sys/fs/ext2fs/ext2_inode_cnv.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/fs/ext2fs/ext2_inode_cnv.c b/sys/fs/ext2fs/ext2_inode_cnv.c
index aff44d9..0fa3075 100644
--- a/sys/fs/ext2fs/ext2_inode_cnv.c
+++ b/sys/fs/ext2fs/ext2_inode_cnv.c
@@ -27,17 +27,18 @@
*/
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/endian.h>
#include <sys/lock.h>
#include <sys/stat.h>
#include <sys/vnode.h>
#include <fs/ext2fs/inode.h>
#include <fs/ext2fs/ext2fs.h>
-#include <fs/ext2fs/ext2_extern.h>
#include <fs/ext2fs/ext2_dinode.h>
+#include <fs/ext2fs/ext2_extern.h>
#define XTIME_TO_NSEC(x) ((x & EXT3_NSEC_MASK) >> 2)
-#define NSEC_TO_XTIME(t) ((t << 2) & EXT3_NSEC_MASK)
+#define NSEC_TO_XTIME(t) (le32toh(t << 2) & EXT3_NSEC_MASK)
void
ext2_print_inode( in )
OpenPOWER on IntegriCloud