summaryrefslogtreecommitdiffstats
path: root/lib/blkdev.c
diff options
context:
space:
mode:
authorSamuel Thibault2011-06-20 12:48:35 +0200
committerKarel Zak2011-06-20 12:48:35 +0200
commit4585ec0b29c28a9c09f69c57ab0f40a69e2d641a (patch)
treedce10567333a912fc3c01dd38a04c8bea3fe085b /lib/blkdev.c
parentmount: add ufstype=ufs2 to mount.8 (diff)
downloadkernel-qcow2-util-linux-4585ec0b29c28a9c09f69c57ab0f40a69e2d641a.tar.gz
kernel-qcow2-util-linux-4585ec0b29c28a9c09f69c57ab0f40a69e2d641a.tar.xz
kernel-qcow2-util-linux-4585ec0b29c28a9c09f69c57ab0f40a69e2d641a.zip
misc: hurd build fixes
* Make blkdev_is_misaligned return 0 when BLKALIGNOFF is not available. * Make procutils.c include c.h to get a PATH_MAX replacement. * Provide agetty.c USE_SYSLOG, DEFAULT_VCTERM and DEFAULT_STERM defaults for Hurd. * Make agetty.c only deal with OFDEL, XCASE and VSWTCH if they are available. Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'lib/blkdev.c')
-rw-r--r--lib/blkdev.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/blkdev.c b/lib/blkdev.c
index fb69e88b5..5cb6554df 100644
--- a/lib/blkdev.c
+++ b/lib/blkdev.c
@@ -210,11 +210,15 @@ blkdev_get_sector_size(int fd, int *sector_size)
*/
int blkdev_is_misaligned(int fd)
{
+#ifdef BLKALIGNOFF
int aligned;
if (ioctl(fd, BLKALIGNOFF, &aligned) < 0)
return 0; /* probably kernel < 2.6.32 */
return aligned;
+#else
+ return 0;
+#endif
}
#ifdef TEST_PROGRAM