diff options
author | Karel Zak | 2009-10-22 14:52:39 +0200 |
---|---|---|
committer | Karel Zak | 2009-10-22 14:52:39 +0200 |
commit | 2a1dfbad1c3da1c98fa35e3175e84229253af387 (patch) | |
tree | 26c4c81930dfee9069bf0e49eb4a815419aefa95 /shlibs/blkid/src/probe.c | |
parent | dmesg: fix typo in man page (diff) | |
download | kernel-qcow2-util-linux-2a1dfbad1c3da1c98fa35e3175e84229253af387.tar.gz kernel-qcow2-util-linux-2a1dfbad1c3da1c98fa35e3175e84229253af387.tar.xz kernel-qcow2-util-linux-2a1dfbad1c3da1c98fa35e3175e84229253af387.zip |
libblkid: use BLKSSZGET for GPT sectors
The current implementation uses fixed sector size (512 bytes), that's
wrong. UEFI standard requires real logical sector size -- it means
BLKSSZGET for Linux.
The size of GPT header is not static, but whole sector is allocated
for the header. In theory the HeaderSize field could be greater than
sizeof(struct gpt_header). It means we have to read whole sector with
the header, because the header crc32 checksum is counted according to
HeaderSize.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'shlibs/blkid/src/probe.c')
-rw-r--r-- | shlibs/blkid/src/probe.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/shlibs/blkid/src/probe.c b/shlibs/blkid/src/probe.c index 078669f48..27bcf3d83 100644 --- a/shlibs/blkid/src/probe.c +++ b/shlibs/blkid/src/probe.c @@ -931,7 +931,7 @@ blkid_loff_t blkid_probe_get_size(blkid_probe pr) * blkid_probe_get_sectorsize: * @pr: probe * - * Returns: block device hardware sector size (BLKSSZGET ioctl, default 512). + * Returns: block device logical sector size (BLKSSZGET ioctl, default 512). */ unsigned int blkid_probe_get_sectorsize(blkid_probe pr) { |