wok-6.x rev 19850
busybox/mkfs_vfat: update hidden sectors (for bootloaders)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Mar 15 17:30:45 2017 +0100 (2017-03-15) |
parents | 3378a0c35726 |
children | 7ebadfdd02af |
files | busybox/receipt busybox/stuff/busybox-1.26-mkfs_vfat.u |
line diff
1.1 --- a/busybox/receipt Wed Mar 15 16:52:45 2017 +0100 1.2 +++ b/busybox/receipt Wed Mar 15 17:30:45 2017 +0100 1.3 @@ -47,6 +47,7 @@ 1.4 shutdown.u 1.5 scriptreplay.u 1.6 bug9471.u 1.7 +mkfs_vfat.u 1.8 EOT 1.9 cp $stuff/$PACKAGE-${VERSION%.*}.config .config 1.10 }
2.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 2.2 +++ b/busybox/stuff/busybox-1.26-mkfs_vfat.u Wed Mar 15 17:30:45 2017 +0100 2.3 @@ -0,0 +1,35 @@ 2.4 +--- busybox-1.26/util-linux/mkfs_vfat.c 2.5 ++++ busybox-1.26/util-linux/mkfs_vfat.c 2.6 +@@ -238,6 +238,7 @@ 2.7 + char *device_name; 2.8 + uoff_t volume_size_bytes; 2.9 + uoff_t volume_size_sect; 2.10 ++ uint32_t hidden; 2.11 + uint32_t total_clust; 2.12 + uint32_t volume_id; 2.13 + int dev; 2.14 +@@ -286,6 +287,7 @@ 2.15 + // Get image size and sector size 2.16 + // 2.17 + bytes_per_sect = SECTOR_SIZE; 2.18 ++ hidden = 0; 2.19 + if (!S_ISBLK(st.st_mode)) { 2.20 + if (!S_ISREG(st.st_mode)) { 2.21 + if (!argv[1]) 2.22 +@@ -342,6 +344,7 @@ 2.23 + // hard drive 2.24 + sect_per_track = geometry.sectors; 2.25 + heads = geometry.heads; 2.26 ++ hidden = geometry.start; 2.27 + 2.28 + set_cluster_size: 2.29 + /* For FAT32, try to do the same as M$'s format command 2.30 +@@ -509,7 +512,7 @@ 2.31 + //STORE_LE(boot_blk->sect_per_fat, 0); 2.32 + STORE_LE(boot_blk->sect_per_track, sect_per_track); 2.33 + STORE_LE(boot_blk->heads, heads); 2.34 +- //STORE_LE(boot_blk->hidden, 0); 2.35 ++ STORE_LE(boot_blk->hidden, hidden); 2.36 + STORE_LE(boot_blk->fat32_volume_size_sect, volume_size_sect); 2.37 + STORE_LE(boot_blk->fat32_sect_per_fat, sect_per_fat); 2.38 + //STORE_LE(boot_blk->fat32_flags, 0);