diff options
author | Karel Zak | 2010-04-07 09:39:05 +0200 |
---|---|---|
committer | Karel Zak | 2010-04-07 09:39:05 +0200 |
commit | 9f4664ee40618b3d393161d82d000f2bca4ec45a (patch) | |
tree | 0418c5210dc380b163a82a09d17f5a7e1e345eea /shlibs/blkid/src/partitions/partitions.h | |
parent | libblkid: fix blkid_partlist_devno_to_partition() for extended partitions (diff) | |
download | kernel-qcow2-util-linux-9f4664ee40618b3d393161d82d000f2bca4ec45a.tar.gz kernel-qcow2-util-linux-9f4664ee40618b3d393161d82d000f2bca4ec45a.tar.xz kernel-qcow2-util-linux-9f4664ee40618b3d393161d82d000f2bca4ec45a.zip |
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>
Diffstat (limited to 'shlibs/blkid/src/partitions/partitions.h')
-rw-r--r-- | shlibs/blkid/src/partitions/partitions.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/shlibs/blkid/src/partitions/partitions.h b/shlibs/blkid/src/partitions/partitions.h index 190918f9e..2a4d20af5 100644 --- a/shlibs/blkid/src/partitions/partitions.h +++ b/shlibs/blkid/src/partitions/partitions.h @@ -14,6 +14,8 @@ extern blkid_partition blkid_partlist_add_partition(blkid_partlist ls, blkid_loff_t start, blkid_loff_t size); extern int blkid_partlist_set_partno(blkid_partlist ls, int partno); +extern int blkid_partlist_increment_partno(blkid_partlist ls); + extern blkid_partition blkid_partlist_get_parent(blkid_partlist ls); extern int blkid_partitions_do_subprobe(blkid_probe pr, |