]> git.sven.stormbind.net Git - sven/exfatprogs.git/commitdiff
Add debian/patches/windows-compat-use-512-sector-size.patch for Windows compatibility...
authorSven Hoexter <sven@stormbind.net>
Tue, 18 Nov 2025 13:53:10 +0000 (14:53 +0100)
committerSven Hoexter <sven@stormbind.net>
Tue, 18 Nov 2025 13:53:10 +0000 (14:53 +0100)
debian/changelog
debian/patches/series [new file with mode: 0644]
debian/patches/windows-compat-use-512-sector-size.patch [new file with mode: 0644]

index f7a829fcfcb0e1ff2f10a007e63c76738230dd88..a65434f75b29b9d2a6d9a44aef4a81d1349bfc71 100644 (file)
@@ -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 <hoexter@debian.org>  Tue, 18 Nov 2025 14:28:07 +0100
 
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644 (file)
index 0000000..19a04c9
--- /dev/null
@@ -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 (file)
index 0000000..68792a9
--- /dev/null
@@ -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);