9 #ifndef LINUX_BEFS_ENDIAN
10 #define LINUX_BEFS_ENDIAN
12 #include <asm/byteorder.h>
70 static inline befs_block_run
71 fsrun_to_cpu(
const struct super_block *sb, befs_disk_block_run n)
87 static inline befs_disk_block_run
88 cpu_to_fsrun(
const struct super_block *sb, befs_block_run n)
90 befs_disk_block_run
run;
93 run.allocation_group =
cpu_to_le32(n.allocation_group);
97 run.allocation_group =
cpu_to_be32(n.allocation_group);
104 static inline befs_data_stream
105 fsds_to_cpu(
const struct super_block *sb,
const befs_disk_data_stream *n)
107 befs_data_stream
data;
111 data.direct[i] = fsrun_to_cpu(sb, n->direct[i]);
113 data.max_direct_range = fs64_to_cpu(sb, n->max_direct_range);
114 data.indirect = fsrun_to_cpu(sb, n->indirect);
115 data.max_indirect_range = fs64_to_cpu(sb, n->max_indirect_range);
116 data.double_indirect = fsrun_to_cpu(sb, n->double_indirect);
117 data.max_double_indirect_range = fs64_to_cpu(sb,
119 max_double_indirect_range);
120 data.size = fs64_to_cpu(sb, n->size);
125 #endif //LINUX_BEFS_ENDIAN