summaryrefslogtreecommitdiff
path: root/util-linux/mkfs_vfat.c
diff options
context:
space:
mode:
Diffstat (limited to 'util-linux/mkfs_vfat.c')
-rw-r--r--util-linux/mkfs_vfat.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/util-linux/mkfs_vfat.c b/util-linux/mkfs_vfat.c
index 1363612f2..ff3e4165a 100644
--- a/util-linux/mkfs_vfat.c
+++ b/util-linux/mkfs_vfat.c
@@ -16,7 +16,6 @@
16# define BLKSSZGET _IO(0x12, 104) 16# define BLKSSZGET _IO(0x12, 104)
17#endif 17#endif
18//#include <linux/msdos_fs.h> 18//#include <linux/msdos_fs.h>
19#include "volume_id/volume_id_internal.h"
20 19
21#define SECTOR_SIZE 512 20#define SECTOR_SIZE 512
22 21
@@ -168,15 +167,15 @@ static const char boot_code[] ALIGN1 =
168 167
169 168
170#define MARK_CLUSTER(cluster, value) \ 169#define MARK_CLUSTER(cluster, value) \
171 ((uint32_t *)fat)[cluster] = cpu_to_le32(value) 170 ((uint32_t *)fat)[cluster] = SWAP_LE32(value)
172 171
173void BUG_unsupported_field_size(void); 172void BUG_unsupported_field_size(void);
174#define STORE_LE(field, value) \ 173#define STORE_LE(field, value) \
175do { \ 174do { \
176 if (sizeof(field) == 4) \ 175 if (sizeof(field) == 4) \
177 field = cpu_to_le32(value); \ 176 field = SWAP_LE32(value); \
178 else if (sizeof(field) == 2) \ 177 else if (sizeof(field) == 2) \
179 field = cpu_to_le16(value); \ 178 field = SWAP_LE16(value); \
180 else if (sizeof(field) == 1) \ 179 else if (sizeof(field) == 1) \
181 field = (value); \ 180 field = (value); \
182 else \ 181 else \