Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Aug 2006 20:53:01 +0000 (UTC)
From:      Marcel Moolenaar <marcel@FreeBSD.org>
To:        src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: src/sys/geom geom_gpt.c
Message-ID:  <200608092053.k79Kr1ew009487@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
marcel      2006-08-09 20:53:01 UTC

  FreeBSD src repository

  Modified files:
    sys/geom             geom_gpt.c 
  Log:
  Strengthen the check for a PMBR:
  o PMBR partitions count to the number of partitions on the disk, which
    means that if a PMBR entry is invalid we will not treat the MBR as a
    PMBR by virtue of it not describing any partitions.
    Previously the checks were inconsistent in that an invalid PMBR entry
    would be harmless when no other partitions exist (we would treat the
    MBR as a PMBR by virtue of it being empty), but it would be fatal when
    there is at least one other partition.
  o The partition size of a PMBR partition is one less than the media size
    because the GPT starts at the second sector (LBA 1) and extends to
    the end of the media. For backward bug-compatibility we accept a size
    that's exactly the media size (FreeBSD bug).
    Also, when the partition size can not be represented in a 32-bit
    integral, the partition size in the MBR is to be set to 0xFFFFFFFF.
    Accept this as a valid size, even if the size can be represented.
  
  Revision  Changes    Path
  1.41      +35 -18    src/sys/geom/geom_gpt.c



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608092053.k79Kr1ew009487>