diff options
author | Jim Meyering <meyering@redhat.com> | 2009-10-15 21:29:36 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2009-10-19 14:58:26 +0200 |
commit | 979bf88defcd1411c4c0adf5faa3d4b0e27b4ac4 (patch) | |
tree | 2a5182db1c12b88542c6380f11439d1e4c6b5894 /configure.ac | |
parent | f6859f2fcbcf18a069a0495cbb8bd2baf395e74d (diff) | |
download | parted-979bf88defcd1411c4c0adf5faa3d4b0e27b4ac4.tar.gz |
linux: use libblkid to determine ->phys_sector_size
Before this change, creating a memory-mapped disk on a fedora-based
system running 2.6.31.1-56.fc12.x86_64 using this command:
modprobe scsi_debug dev_size_mb=1025 sector_size=4096
and then running "parted -s /dev/sdd mklabel gpt print"
would mistakenly print "Sector size (logical/physical): 4096B/512B"
The "512B" is what's wrong. It should be "4096B".
* configure.ac: Test for a new-enough blkid library.
* libparted/Makefile.am (libparted_la_LIBADD): Add $(LIB_BLKID).
* libparted/arch/linux.c (get_minimum_io_size): New function.
(_device_set_sector_size): Use it.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 0500b5b..af1caee 100644 --- a/configure.ac +++ b/configure.ac @@ -603,6 +603,18 @@ HOST=$(hostname) BUILDINFO="$USER@$HOST, $DATE" AC_SUBST([BUILDINFO]) +LIB_BLKID= +AC_SUBST([LIB_BLKID]) +pe_saved_libs=$LIBS + AC_SEARCH_LIBS([blkid_probe_get_topology], [blkid], + [test "$ac_cv_search_blkid_probe_get_topology" = "none required" \ + || LIB_BLKID=$ac_cv_search_blkid_probe_get_topology]) + AC_CHECK_FUNC([blkid_probe_get_topology], [use_blkid=1], [use_blkid=0]) +LIBS=$pe_saved_libs +AC_DEFINE_UNQUOTED([USE_BLKID], [$use_blkid], + [Define if you have sufficient blkid support.]) +AC_CHECK_HEADERS_ONCE([blkid/blkid.h]) + AC_OUTPUT([ Makefile lib/Makefile |