On Fri, Oct 08, 2010 at 09:16:46AM -0400, Davidlohr Bueso wrote: > > - note that libblkid is interpreting partitions tables in the same > > way how Linux kernel (for example empty are ignored). I expect the > > same behaviour from partx. > > > You mean this: When using blkid we don't have to show inexistent > partitions, has opposed to the original partx: Yes, it's fdisk job to work with things like hidden or special partitions. > original: > # partx /dev/sda > # 1: 2048-468520959 (468518912 sectors, 239881 MB) > # 2: 468523006-488396799 ( 19873794 sectors, 10175 MB) > # 3: 0- -1 ( 0 sectors, 0 MB) > # 4: 0- -1 ( 0 sectors, 0 MB) > # 5: 468523008-488396799 ( 19873792 sectors, 10175 MB) > > with libblkid: > # ./partx /dev/sda > # 1: 2048-468520959 (468518912 sectors, 239881 MB) > # 2: 468523006-488396799 ( 19873794 sectors, 10175 MB) > # 5: 468523008-488396799 ( 19873792 sectors, 10175 MB) Note that partition serial number has to be also used from libblkid (blkid_partition_get_partno()) -- it has to be compatible with kernel (for example MBR logical partitions have partno >= 5). Karel -- Karel Zak <kzak@xxxxxxxxxx> http://karelzak.blogspot.com -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html