bug-parted
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16885: [PATCH] libparted: don't require a system id string


From: Edward Diener
Subject: bug#16885: [PATCH] libparted: don't require a system id string
Date: Sun, 02 Mar 2014 09:03:51 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

On 3/1/2014 9:25 PM, Phillip Susi wrote:> 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.

Thanks !

Hopefully GParted Live ( Debian sid ) will pick this up and some further release of it will incorporate this fix.

>
> Signed-off-by: Phillip Susi <address@hidden>
> ---
>   NEWS                            | 4 ++++
>   libparted/fs/fat/bootsector.c   | 7 -------
>   libparted/fs/r/fat/bootsector.c | 7 -------
>   3 files changed, 4 insertions(+), 14 deletions(-)
>
> diff --git a/NEWS b/NEWS
> index 935fa33..819f1c6 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -12,6 +12,10 @@ GNU parted NEWS -*- outline -*-
>     boot partition type.
>
>   ** Bug Fixes
> +
> +  Do not reject a FAT boot sector as invalid because it has no
> +  system ID string.
> +
>     Fix gpt to correctly handle non ASCII charcters in partition names
>
>     If a drive was 100 times an even multiple of two, sizes specified as
> 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,
>






reply via email to

[Prev in Thread] Current Thread [Next in Thread]