rpms/e2fsprogs/devel e2fsprogs-1.40.2-blkid-FAT-magic-not-on-strict-position.patch, 1.1, 1.2 e2fsprogs.spec, 1.85, 1.86
Eric Sandeen (sandeen)
fedora-extras-commits at redhat.com
Tue Nov 27 16:21:21 UTC 2007
Author: sandeen
Update of /cvs/pkgs/rpms/e2fsprogs/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25790
Modified Files:
e2fsprogs-1.40.2-blkid-FAT-magic-not-on-strict-position.patch
e2fsprogs.spec
Log Message:
* Tue Nov 27 2007 Eric Sandeen <esandeen at redhat.com> 1.40.2-12
- Use upstream patch for blkid fat detection, avoids div-by-zero
when encountering some BSD partitions (#398281)
e2fsprogs-1.40.2-blkid-FAT-magic-not-on-strict-position.patch:
Index: e2fsprogs-1.40.2-blkid-FAT-magic-not-on-strict-position.patch
===================================================================
RCS file: /cvs/pkgs/rpms/e2fsprogs/devel/e2fsprogs-1.40.2-blkid-FAT-magic-not-on-strict-position.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- e2fsprogs-1.40.2-blkid-FAT-magic-not-on-strict-position.patch 18 Sep 2007 17:47:14 -0000 1.1
+++ e2fsprogs-1.40.2-blkid-FAT-magic-not-on-strict-position.patch 27 Nov 2007 16:21:18 -0000 1.2
@@ -1,67 +1,35 @@
-From 3a493033ce3867a2561d60c1016dd0c03999e5eb Mon Sep 17 00:00:00 2001
-From: Karel Zak <kzak at redhat.com>
-Date: Tue, 18 Sep 2007 15:29:59 +0200
-Subject: [PATCH] libblkid: FAT magic is not on strict position when there is a real MBR
-
-There is _optional_ reserved space before FAT:
-
- boot | reserved | FAT | FAT | root | data
- sector | space | 1 | 2 | dir | region
-
-for more details see:
- http://en.wikipedia.org/wiki/File_Allocation_Table
-
-The probe_fat() code already expects reserved space and other optional
-junk in MBR+FAT, but the blkid_magic array expects strictly defined
-positions of FAT magic strings. That's correct for 99% partitions, but
-not for situation when on the same partition is real MBR. We need to check
-for FAT filesystem also when we detect MBR signature (0x55AA on address 510).
-
-The blkid is not able to detect vfat on USB Disks where is only one
-bootable partition with vfat, for example:
-
- # file -s /dev/sdc1
- /dev/sdc1: x86 boot sector; GRand Unified Bootloader, stage1 version
- 0x3, 1st sector stage2 0x44ae, code offset 0x48, sectors/cluster 8,
- Media descriptor 0xf8, heads 4, sectors 3901408 (volumes > 32 MB) ,
- physical drive 0xdb, physical drive 0x5b, reserved 0xe, dos < 4.0
- BootSector (0x0)
-
- # vol_id /dev/sdc1
- ID_FS_USAGE=filesystem
- ID_FS_TYPE=vfat
- ID_FS_VERSION=FAT32
- ID_FS_UUID=0044-AE80
- ID_FS_UUID_ENC=0044-AE80
- ID_FS_LABEL=Mdv_Flash
- ID_FS_LABEL_ENC=Mdv_Flash
- ID_FS_LABEL_SAFE=Mdv_Flash
-
-old version:
- # blkid /dev/sdc1
-
-fixed version:
- # blkid /dev/sdc1
- /dev/sdc1: LABEL="MDV_FLASH" UUID="0044-AE80" TYPE="vfat"
+From: Theodore Ts'o <tytso at mit.edu>
+Date: Sun, 23 Sep 2007 13:50:11 +0000 (-0400)
+Subject: libblkid: Add more magic numbers that might mean there is a FAT filesystem
+X-Git-Url: http://git.kernel.org/?p=fs%2Fext2%2Fe2fsprogs.git;a=commitdiff_plain;h=846be6db813895c354cc54beaa8fa6aba8d98085
+
+libblkid: Add more magic numbers that might mean there is a FAT filesystem
+
+The FAT filesystem doesn't have its superblock with a set of magic
+strings in a fixed location. Therefore, we must also check for the
+FAT filesystem if it looks like we have an MBR at the beginning of the
+partition. We previously checked if the first byte was a jump
+instruction but that missed some USB disks with only one bootable
+partition. Now we check for the MBR signature (0x55AA at offset 510)
+as well as any partition where byte 0 is \351 or \353.
Signed-off-by: Karel Zak <kzak at redhat.com>
+Signed-off-by: "Theodore Ts'o" <tytso at mit.edu>
---
- lib/blkid/probe.c | 1 +
- 1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/lib/blkid/probe.c b/lib/blkid/probe.c
-index d56292e..42ec234 100644
+index 69a43b0..5c20127 100644
--- a/lib/blkid/probe.c
+++ b/lib/blkid/probe.c
-@@ -849,6 +849,7 @@ static struct blkid_magic type_array[] = {
+@@ -846,8 +846,9 @@ static struct blkid_magic type_array[] = {
+ { "vfat", 0, 0x36, 5, "MSDOS", probe_fat },
+ { "vfat", 0, 0x36, 8, "FAT16 ", probe_fat },
{ "vfat", 0, 0x36, 8, "FAT12 ", probe_fat },
- { "vfat", 0, 0, 2, "\353\220", probe_fat_nomagic },
+- { "vfat", 0, 0, 2, "\353\220", probe_fat_nomagic },
++ { "vfat", 0, 0, 1, "\353", probe_fat_nomagic },
{ "vfat", 0, 0, 1, "\351", probe_fat_nomagic },
-+ { "vfat", 0, 0x1fe, 2, "\125\252", probe_fat },
++ { "vfat", 0, 0x1fe, 2, "\125\252", probe_fat_nomagic },
{ "minix", 1, 0x10, 2, "\177\023", 0 },
{ "minix", 1, 0x10, 2, "\217\023", 0 },
{ "minix", 1, 0x10, 2, "\150\044", 0 },
---
-1.5.2.4
-
Index: e2fsprogs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/e2fsprogs/devel/e2fsprogs.spec,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- e2fsprogs.spec 24 Oct 2007 02:02:21 -0000 1.85
+++ e2fsprogs.spec 27 Nov 2007 16:21:18 -0000 1.86
@@ -4,7 +4,7 @@
Summary: Utilities for managing the second and third extended (ext2/ext3) filesystems
Name: e2fsprogs
Version: 1.40.2
-Release: 11%{?dist}
+Release: 12%{?dist}
# License based on upstream-modified COPYING file,
# which clearly states "V2" intent.
License: GPLv2
@@ -267,6 +267,10 @@
%{_mandir}/man3/uuid_unparse.3*
%changelog
+* Tue Nov 27 2007 Eric Sandeen <esandeen at redhat.com> 1.40.2-12
+- Use upstream patch for blkid fat detection, avoids div-by-zero
+ when encountering some BSD partitions (#398281)
+
* Tue Oct 23 2007 Eric Sandeen <esandeen at redhat.com> 1.40.2-11
- Add arm to multilib header wrapper
More information about the fedora-extras-commits
mailing list