fstests: Replace all __[u]intNN_t types with standard [u]intNN_t
[xfstests-dev.git] / src / loggen.c
index 4b55667588e1bf10e51e3b1f05745cc238f5510c..ed1ebbccc8baa0f8c84f8806225fd2ce4f3ae796 100644 (file)
  *                                                  - dxm 29/09/00
  */
 
+#include <config.h>
+
 #include <xfs/libxfs.h>
+#ifdef HAVE_XFS_XFS_LOG_FORMAT_H
+#include <xfs/xfs_log_format.h>
+#define XFS_TRANS_MAGIC        XFS_TRANS_HEADER_MAGIC
+#else /* HAVE_XFS_XFS_LOG_FORMAT_H */
 #include <xfs/xfs_log.h>
 #include <xfs/xfs_log_priv.h>
+#endif /* HAVE_XFS_XFS_LOG_FORMAT_H */
 
 #ifndef ASSIGN_ANY_LSN_DISK
 #define ASSIGN_ANY_LSN_DISK(lsn,cycle,block)  \
@@ -112,9 +119,9 @@ loggen_unmount(int count)
     xlog_op_header_t        *op;
     /* the data section must be 32 bit size aligned */
     struct {
-        __uint16_t magic;
-        __uint16_t pad1;
-        __uint32_t pad2; /* may as well make it 64 bits */
+        uint16_t magic;
+        uint16_t pad1;
+        uint32_t pad2; /* may as well make it 64 bits */
     } magic = { XLOG_UNMOUNT_TYPE, 0, 0 };
     
     if (!count) count=1;
@@ -134,7 +141,6 @@ loggen_unmount(int count)
     head->h_cycle = cpu_to_be32(param_cycle);
     head->h_version = cpu_to_be32(1);
     head->h_len = cpu_to_be32(20);
-    head->h_chksum = cpu_to_be32(0);
     head->h_prev_block = cpu_to_be32(-1);
     head->h_num_logops = cpu_to_be32(1);
     head->h_cycle_data[0] = cpu_to_be32(0xb0c0d0d0);
@@ -202,7 +208,6 @@ loggen_empty(int count)
                                                     sizeof(xfs_trans_header_t)+
                                                     sizeof(xfs_buf_log_format_t)+
                                                     sizeof(int));
-    head->h_chksum         = cpu_to_be32(0);
     head->h_prev_block     = cpu_to_be32(-1);
     head->h_num_logops     = cpu_to_be32(5);
     head->h_cycle_data[0]  = cpu_to_be32(0xb0c0d0d0);