summaryrefslogtreecommitdiffstats
path: root/shlibs/blkid/src/partitions
diff options
context:
space:
mode:
authorKarel Zak2010-03-03 13:12:02 +0100
committerKarel Zak2010-03-03 14:00:34 +0100
commit25d1e630f6e32f05454ba38e5c4fdd03b66de589 (patch)
tree06016faf5a6c0240e0da2edf8be7e94cb7a0e645 /shlibs/blkid/src/partitions
parentmount: posix option of vfat is obsolete (diff)
downloadkernel-qcow2-util-linux-25d1e630f6e32f05454ba38e5c4fdd03b66de589.tar.gz
kernel-qcow2-util-linux-25d1e630f6e32f05454ba38e5c4fdd03b66de589.tar.xz
kernel-qcow2-util-linux-25d1e630f6e32f05454ba38e5c4fdd03b66de589.zip
libblkid: support alignment_offset=-1
Unfortunately, Linux kernel uses "signed int" for alignment_offset and the offset could be -1 for devices with undefined alignment (if no compatible sizes and alignments exist for stacked devices). There is no way how libblkid caller can respond to the value -1, so we are going to hide this corner case... TODO: maybe we can export an extra boolean value 'misaligned' rather then complete hide this problem. We will see... Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/src/partitions')
-rw-r--r--shlibs/blkid/src/partitions/partitions.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/shlibs/blkid/src/partitions/partitions.c b/shlibs/blkid/src/partitions/partitions.c
index 9c3296e90..0f342fc87 100644
--- a/shlibs/blkid/src/partitions/partitions.c
+++ b/shlibs/blkid/src/partitions/partitions.c
@@ -828,9 +828,9 @@ blkid_partition blkid_partlist_devno_to_partition(blkid_partlist ls, dev_t devno
uint64_t start, size;
int i;
- if (blkid_devno_get_attribute(devno, "start", &start))
+ if (blkid_devno_get_u64_attribute(devno, "start", &start))
return NULL;
- if (blkid_devno_get_attribute(devno, "size", &size))
+ if (blkid_devno_get_u64_attribute(devno, "size", &size))
return NULL;
for (i = 0; i < ls->nparts; i++) {