#
PKG_MAJOR=2
PKG_MINOR=4
-PKG_REVISION=4
+PKG_REVISION=5
PKG_BUILD=0
+xfsprogs-2.4.5 (03 April 2003)
+ - Sync up xfs_inode.c in libxfs
+ - Implement get_unaligned/put_unaligned in libxfs
+
xfsprogs-2.4.4 (30 March 2003)
- Correct display of imaxpct in mkfs.xfs output.
- Portability changes; including some code to support use
#define XFS_TRANS_UNRESERVE_BLKQUOTA(mp,tp,ip,nblks)
#define XFS_TRANS_RESERVE_QUOTA_NBLKS(mp,tp,ip,nblks,ninos,fl)
+/* These are lifted from the kernel */
+#define get_unaligned(ptr) \
+ ({ __typeof__(*(ptr)) __tmp; memmove(&__tmp, (ptr), sizeof(*(ptr))); __tmp; })
+
+#define put_unaligned(val, ptr) \
+ ({ __typeof__(*(ptr)) __tmp = (val); \
+ memmove((ptr), &__tmp, sizeof(*(ptr))); \
+ (void)0; })
+
#if (__GNUC__ < 2) || ((__GNUC__ == 2) && (__GNUC_MINOR__ <= 95))
# define xfs_fs_cmn_err(a,b,msg,args...)( fprintf(stderr, msg, ## args) )
# define cmn_err(a,msg,args...) ( fprintf(stderr, msg, ## args) )
ep = ifp->if_u1.if_extents;
#if ARCH_CONVERT != ARCH_NOCONVERT
for (i = 0; i < nex; i++, ep++, dp++) {
- ep->l0 = INT_GET(dp->l0, ARCH_CONVERT);
- ep->l1 = INT_GET(dp->l1, ARCH_CONVERT);
+ ep->l0 = INT_GET(get_unaligned((__uint64_t*)&dp->l0),
+ ARCH_CONVERT);
+ ep->l1 = INT_GET(get_unaligned((__uint64_t*)&dp->l1),
+ ARCH_CONVERT);
}
#else
memcpy(ep, dp, size);
#if ARCH_CONVERT != ARCH_NOCONVERT
/* Translate to on disk format */
- dest_ep->l0 = INT_GET(ep->l0, ARCH_CONVERT);
- dest_ep->l1 = INT_GET(ep->l1, ARCH_CONVERT);
+ put_unaligned(INT_GET(ep->l0, ARCH_CONVERT),
+ (__uint64_t*)&dest_ep->l0);
+ put_unaligned(INT_GET(ep->l1, ARCH_CONVERT),
+ (__uint64_t*)&dest_ep->l1);
#else
*dest_ep = *ep;
#endif