# HG changeset patch # User Pascal Bellard # Date 1489595445 -3600 # Node ID 10cf54238be9686ad940337c151062e3fbb7e5fd # Parent 3378a0c3572643f04a94e528c82e06d988902970 busybox/mkfs_vfat: update hidden sectors (for bootloaders) diff -r 3378a0c35726 -r 10cf54238be9 busybox/receipt --- a/busybox/receipt Wed Mar 15 16:52:45 2017 +0100 +++ b/busybox/receipt Wed Mar 15 17:30:45 2017 +0100 @@ -47,6 +47,7 @@ shutdown.u scriptreplay.u bug9471.u +mkfs_vfat.u EOT cp $stuff/$PACKAGE-${VERSION%.*}.config .config } diff -r 3378a0c35726 -r 10cf54238be9 busybox/stuff/busybox-1.26-mkfs_vfat.u --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/busybox/stuff/busybox-1.26-mkfs_vfat.u Wed Mar 15 17:30:45 2017 +0100 @@ -0,0 +1,35 @@ +--- busybox-1.26/util-linux/mkfs_vfat.c ++++ busybox-1.26/util-linux/mkfs_vfat.c +@@ -238,6 +238,7 @@ + char *device_name; + uoff_t volume_size_bytes; + uoff_t volume_size_sect; ++ uint32_t hidden; + uint32_t total_clust; + uint32_t volume_id; + int dev; +@@ -286,6 +287,7 @@ + // Get image size and sector size + // + bytes_per_sect = SECTOR_SIZE; ++ hidden = 0; + if (!S_ISBLK(st.st_mode)) { + if (!S_ISREG(st.st_mode)) { + if (!argv[1]) +@@ -342,6 +344,7 @@ + // hard drive + sect_per_track = geometry.sectors; + heads = geometry.heads; ++ hidden = geometry.start; + + set_cluster_size: + /* For FAT32, try to do the same as M$'s format command +@@ -509,7 +512,7 @@ + //STORE_LE(boot_blk->sect_per_fat, 0); + STORE_LE(boot_blk->sect_per_track, sect_per_track); + STORE_LE(boot_blk->heads, heads); +- //STORE_LE(boot_blk->hidden, 0); ++ STORE_LE(boot_blk->hidden, hidden); + STORE_LE(boot_blk->fat32_volume_size_sect, volume_size_sect); + STORE_LE(boot_blk->fat32_sect_per_fat, sect_per_fat); + //STORE_LE(boot_blk->fat32_flags, 0);