[syslinux] [PATCH 1/5] fat: fix minfatsize for large FAT32

Pete Batard pete at akeo.ie
Wed Feb 24 05:02:21 PST 2016


When trying to installing Syslinux on a FAT32 drive formatted using 
Ridgecrop's Large FAT32 formatting tool [1], the installer will bail due 
to the minfatsize check, as there is an extra sector being used. This 
fix addresses that.

[1] http://www.ridgecrop.demon.co.uk/index.htm?fat32format.htm
-------------- next part --------------
From 2c674478a81126f3ac9ee4a53ab8507217465d00 Mon Sep 17 00:00:00 2001
From: Pete Batard <pete at akeo.ie>
Date: Tue, 23 Feb 2016 17:19:48 +0000
Subject: [PATCH 1/5] fat: fix minfatsize for large FAT32

* Ridgecrop's Large FAT32 format produces volume that fail
  the check as they have an extra sector.
---
 libfat/open.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libfat/open.c b/libfat/open.c
index 7281e03..dad372b 100644
--- a/libfat/open.c
+++ b/libfat/open.c
@@ -92,7 +92,7 @@ libfat_open(int (*readfunc) (intptr_t, void *, size_t, libfat_sector_t),
     } else
 	goto barf;		/* Impossibly many clusters */
 
-    minfatsize = (minfatsize + LIBFAT_SECTOR_SIZE - 1) >> LIBFAT_SECTOR_SHIFT;
+    minfatsize >>= LIBFAT_SECTOR_SHIFT;
 
     if (minfatsize > fatsize)
 	goto barf;		/* The FATs don't fit */
-- 
1.9.5.msysgit.1



More information about the Syslinux mailing list