From: Sven Hoexter Date: Tue, 18 Nov 2025 13:53:10 +0000 (+0100) Subject: Add debian/patches/windows-compat-use-512-sector-size.patch for Windows compatibility... X-Git-Tag: debian/1.2.9-1+deb13u1~2 X-Git-Url: https://git.sven.stormbind.net/?a=commitdiff_plain;h=ca71ed36cd8d064d8b7b54a9f383d6340b846ff7;p=sven%2Fexfatprogs.git Add debian/patches/windows-compat-use-512-sector-size.patch for Windows compatibility. Windows fails to access devices with a 4KB sector size which use a 512Byte sector size emulation. Cherry-Pick the fix from exfatprogs 1.3.0 which uses a 512Byte sector size by default on those devices, despite the performance penalty. (Closes: #1120932) --- diff --git a/debian/changelog b/debian/changelog index f7a829f..a65434f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,12 @@ exfatprogs (1.2.9-1+deb13u1) UNRELEASED; urgency=medium * Add trixie branch information to gbp.conf and Vcs-Git. + * Add debian/patches/windows-compat-use-512-sector-size.patch + for Windows compatibility. Windows fails to access devices + with a 4KB sector size which use a 512Byte sector size + emulation. Cherry-Pick the fix from exfatprogs 1.3.0 + which uses a 512Byte sector size by default on those devices, + despite the performance penalty. (Closes: #1120932) -- Sven Hoexter Tue, 18 Nov 2025 14:28:07 +0100 diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..19a04c9 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +windows-compat-use-512-sector-size.patch diff --git a/debian/patches/windows-compat-use-512-sector-size.patch b/debian/patches/windows-compat-use-512-sector-size.patch new file mode 100644 index 0000000..68792a9 --- /dev/null +++ b/debian/patches/windows-compat-use-512-sector-size.patch @@ -0,0 +1,18 @@ +Origin: https://github.com/exfatprogs/exfatprogs/commit/d4f77ae41ce178c04b8e3326178554182ca94bd5 +Bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1120932 +Description: Windows 11 seems to be unable to deal with a 4KB +sector size for devices with a 512Byte sector size emulation. +This patch was released with exfatprogs 1.3.0. +Index: exfatprogs/lib/libexfat.c +=================================================================== +--- exfatprogs.orig/lib/libexfat.c ++++ exfatprogs/lib/libexfat.c +@@ -189,8 +189,6 @@ int exfat_get_blk_dev_info(struct exfat_ + + if (ui->sector_size) + bd->sector_size = ui->sector_size; +- else if (ioctl(fd, BLKPBSZGET, &bd->sector_size) >= 0) +- ; + else if (ioctl(fd, BLKSSZGET, &bd->sector_size) < 0) + bd->sector_size = DEFAULT_SECTOR_SIZE; + bd->sector_size_bits = sector_size_bits(bd->sector_size);