summaryrefslogtreecommitdiffstats
path: root/fdisk/Makefile.am
diff options
context:
space:
mode:
authorKarel Zak2009-10-29 11:25:59 +0100
committerKarel Zak2009-11-18 11:25:09 +0100
commit05dc9645f64e21167d297f435951a7bf2a43c43e (patch)
tree07fc402774c1fb232af97a6e5ee6817a1d6a4b56 /fdisk/Makefile.am
parentmore: limited line buffer length results in corrupted UTF-8 text (diff)
downloadkernel-qcow2-util-linux-05dc9645f64e21167d297f435951a7bf2a43c43e.tar.gz
kernel-qcow2-util-linux-05dc9645f64e21167d297f435951a7bf2a43c43e.tar.xz
kernel-qcow2-util-linux-05dc9645f64e21167d297f435951a7bf2a43c43e.zip
fdisk: read topology info from libblkid
and print ('p' command) info about logical and physical sectors and alignment_offset. minimum_io_size we don't use physical sector size directly, because on RAIDs is better to use minimum_io_size (aka stripe chunk size). For disk drives is minimum_io_size the same value as physical sector size. alignment_offset For compatibility with legacy operating systems some vendors provide disks where logical and physical sectors are aligned at sector 63 (= geometry.sectors). In other words the physical 4KB sectors start at LBA -1. Then the physical boundary is at: alignment_offset + N * phy_sector_size Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'fdisk/Makefile.am')
-rw-r--r--fdisk/Makefile.am15
1 files changed, 15 insertions, 0 deletions
diff --git a/fdisk/Makefile.am b/fdisk/Makefile.am
index fed3ebfda..31d631213 100644
--- a/fdisk/Makefile.am
+++ b/fdisk/Makefile.am
@@ -18,12 +18,27 @@ fdisk_SOURCES = fdisk.c fdiskbsdlabel.c fdisksgilabel.c \
fdisk.h fdisksunlabel.h fdisksgilabel.h fdiskaixlabel.h \
fdiskbsdlabel.h fdiskmaclabel.h $(fdisk_common)
+cflags_fdisk = $(AM_CFLAGS)
+ldadd_fdisk =
+
+if BUILD_LIBBLKID
+# only in-tree libblkid has topology support
+ldadd_fdisk += $(ul_libblkid_la)
+cflags_fdisk += -I$(ul_libblkid_srcdir)
+endif
+
if HAVE_STATIC_FDISK
sbin_PROGRAMS += fdisk.static
fdisk_static_SOURCES = $(fdisk_SOURCES)
fdisk_static_LDFLAGS = -all-static
+fdisk_static_CFLAGS = $(cflags_fdisk)
+fdisk_static_LDADD = $(ldadd_fdisk)
endif
+fdisk_CFLAGS = $(cflags_fdisk)
+fdisk_LDADD = $(ldadd_fdisk)
+
+
if !ARCH_SPARC
sbin_PROGRAMS += sfdisk