]> err.no Git - util-linux/commit
libblkid: fix 'partno' usage
authorKarel Zak <kzak@redhat.com>
Wed, 7 Apr 2010 07:39:05 +0000 (09:39 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 7 Apr 2010 07:39:05 +0000 (09:39 +0200)
commit9f4664ee40618b3d393161d82d000f2bca4ec45a
tree0418c5210dc380b163a82a09d17f5a7e1e345eea
parent4720bb19c15752e5e5c2fc0dbba5b3b748afaf12
libblkid: fix 'partno' usage

Linux kernel ignores empty partitions, but partition number is always
allocated for the partition. (This rule is used for primary partitions
only.)

For example:

  part 1.  size=12345
  part 2.  size=0
  part 3.  size=24567

the final list of partitions:

  sda1 sda3

'sda2' is not defined and partno=2 is not used for any other
partitions.

The libblkid library has to be compatible with this rule.

Signed-off-by: Karel Zak <kzak@redhat.com>
shlibs/blkid/src/partitions/dos.c
shlibs/blkid/src/partitions/gpt.c
shlibs/blkid/src/partitions/partitions.c
shlibs/blkid/src/partitions/partitions.h
shlibs/blkid/src/partitions/sgi.c
shlibs/blkid/src/partitions/sun.c