cvs commit: src/sys/geom geom_gpt.c

Marcel Moolenaar marcel at FreeBSD.org
Wed Aug 9 20:53:02 UTC 2006


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


More information about the cvs-src mailing list