parted/0080-libparted-don-t-require-a-system-id-string.patch
Brian C. Lane 0b7af917e2 - Rebase on new upstream master commit cc382c3
- Drop patches incorporated into upstream
- Still adds the various DASD patches
2014-04-08 11:46:37 -07:00

69 lines
2.4 KiB
Diff

From 80f4f42c805ee37392c5cc43d8ac08772b7b1cf1 Mon Sep 17 00:00:00 2001
From: Phillip Susi <psusi@ubuntu.com>
Date: Sat, 1 Mar 2014 21:23:39 -0500
Subject: [PATCH 80/89] libparted: don't require a system id string
Historically the system ID field of a fat boot sector contains a
string identifying the OS that formatted it. It appears that some
recent versions of Windows have stopped bothering with this. Stop
requiring this string to recognize fat as valid.
---
NEWS | 3 +++
libparted/fs/fat/bootsector.c | 7 -------
libparted/fs/r/fat/bootsector.c | 7 -------
3 files changed, 3 insertions(+), 14 deletions(-)
diff --git a/NEWS b/NEWS
index 7b69d3d..88dd1fe 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,9 @@ GNU parted NEWS -*- outline -*-
** Bug Fixes
+ Do not reject a FAT boot sector as invalid because it has no
+ system ID string.
+
libparted: /dev/md/ symlink can change after libparted dereferences it,
instead it should just use the symlink as given by the caller in the
same way we do with /dev/mapper/.
diff --git a/libparted/fs/fat/bootsector.c b/libparted/fs/fat/bootsector.c
index d4f8dc4..dacc79c 100644
--- a/libparted/fs/fat/bootsector.c
+++ b/libparted/fs/fat/bootsector.c
@@ -51,13 +51,6 @@ fat_boot_sector_read (FatBootSector* bs, const PedGeometry *geom)
return 0;
}
- if (!bs->system_id[0]) {
- ped_exception_throw (PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL,
- _("File system has an invalid signature for a FAT "
- "file system."));
- return 0;
- }
-
if (!bs->sector_size
|| PED_LE16_TO_CPU (bs->sector_size) % PED_SECTOR_SIZE_DEFAULT) {
ped_exception_throw (PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL,
diff --git a/libparted/fs/r/fat/bootsector.c b/libparted/fs/r/fat/bootsector.c
index 07b39cf..3aff1d7 100644
--- a/libparted/fs/r/fat/bootsector.c
+++ b/libparted/fs/r/fat/bootsector.c
@@ -51,13 +51,6 @@ fat_boot_sector_read (FatBootSector* bs, const PedGeometry *geom)
return 0;
}
- if (!bs->system_id[0]) {
- ped_exception_throw (PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL,
- _("File system has an invalid signature for a FAT "
- "file system."));
- return 0;
- }
-
if (!bs->sector_size
|| PED_LE16_TO_CPU (bs->sector_size) % PED_SECTOR_SIZE_DEFAULT) {
ped_exception_throw (PED_EXCEPTION_ERROR, PED_EXCEPTION_CANCEL,
--
1.8.5.3