libfdisk: add generic function to check partitions order

Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk: fix logical partition reorder command

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Karel Zak <kzak@redhat.com>
libblkid: make new_partition() more robust

Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols: fix buffer usage

Signed-off-by: Karel Zak <kzak@redhat.com>