[parted-devel] [parted 1.8.8] msdos label and file system corruption issues with > 2TB disk

Otavio Salvador otavio at debian.org
Sun Feb 3 19:38:40 UTC 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Jim Meyering <jim at meyering.net> writes:

> +#if 1
> +#endif

looks to be debug code ;-)

>>From 72c7e8067fe53830baf9d291bd8ae8879e07f6b8 Mon Sep 17 00:00:00 2001
> From: Jim Meyering <meyering at redhat.com>
> Date: Thu, 10 Jan 2008 14:51:56 +0100
> Subject: [PATCH] Enforce inherent limitations of dos and dvh partition table formats.
>
> * libparted/disk.c (_check_partition): Enforce the 32-bit limitation
> on a partition's starting sector number and length (in sectors).
> With the usual 512-byte sector size, this limits the maximum
> partition size to just under 2TB.
> (_partition_max_start, _partition_max_len): New functions.
> (_check_partition): Use them.
> * tests/t4100-msdos-partition-limits.sh: New file.  Test vs. msdos.
> * tests/t4100-dvh-partition-limits.sh: New file.  Test vs. dvh.
> * tests/Makefile.am (TESTS): Add t4100-msdos-partition-limits.sh
> and t4100-dvh-partition-limits.sh.
>
> Signed-off-by: Jim Meyering <meyering at redhat.com>
> ---
>  libparted/disk.c                      |   67 +++++++++++++-
>  tests/Makefile.am                     |    4 +-
>  tests/t4100-dvh-partition-limits.sh   |  169 +++++++++++++++++++++++++++++++++
>  tests/t4100-msdos-partition-limits.sh |  168 ++++++++++++++++++++++++++++++++
>  4 files changed, 406 insertions(+), 2 deletions(-)
>  create mode 100755 tests/t4100-dvh-partition-limits.sh
>  create mode 100755 tests/t4100-msdos-partition-limits.sh
>
> diff --git a/libparted/disk.c b/libparted/disk.c
> index 087fbbf..ec09996 100644
> --- a/libparted/disk.c
> +++ b/libparted/disk.c
> @@ -1,6 +1,6 @@
>   /*
>      libparted - a library for manipulating disk partitions
> -    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2007
> +    Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005, 2007, 2008
>                    Free Software Foundation, Inc.

You could merge the years as done in previous commit, looks much better.

.. 2000-2003, 2005, 2007, 2008

Rest looks OK. :-)

Thank you!

- -- 
        O T A V I O    S A L V A D O R
- ---------------------------------------------
 E-mail: otavio at debian.org      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://otavio.ossystems.com.br
- ---------------------------------------------
"Microsoft sells you Windows ... Linux gives
 you the whole house."
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Processed by Mailcrypt 3.5.8+ <http://mailcrypt.sourceforge.net/>

iD8DBQFHphg/LqiZQEml+FURAk0QAJ98Zece526ra+swQvc2dS8B4uU8aACfWjeh
y7qnNYV/3PF0RnI0uTHnsl0=
=3qgw
-----END PGP SIGNATURE-----



More information about the parted-devel mailing list