From: LaMont Jones Date: Fri, 20 Mar 2009 16:36:40 +0000 (-0600) Subject: Merge commit 'origin/master' X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4923b27bb6c6ff2b357b3e7e68e72c4c6023f98b;p=util-linux Merge commit 'origin/master' Conflicts: NEWS config/include-Makefile.am configure.ac mount/Makefile.am mount/mount.c po/ca.po po/cs.po po/da.po po/de.po po/es.po po/et.po po/eu.po po/fi.po po/fr.po po/hu.po po/id.po po/it.po po/ja.po po/nl.po po/pl.po po/pt_BR.po po/ru.po po/sl.po po/sv.po po/tr.po po/uk.po po/util-linux-ng.pot po/vi.po po/zh_CN.po --- 4923b27bb6c6ff2b357b3e7e68e72c4c6023f98b diff --cc mount/Makefile.am index acaf848c,7714efbc..91860d23 --- a/mount/Makefile.am +++ b/mount/Makefile.am @@@ -6,43 -6,46 +6,46 @@@ bin_PROGRAMS = mount umoun sbin_PROGRAMS = losetup swapon dist_man_MANS = fstab.5 mount.8 swapoff.8 swapon.8 umount.8 losetup.8 - utils_common = sundries.c xmalloc.c realpath.c fsprobe.c - - if !HAVE_VERSIONSORT - fallback = ../lib/strverscmp.c - endif - - headers_common = fstab.h mount_mntent.h mount_constants.h \ - lomount.h fsprobe.h realpath.h xmalloc.h \ - getusername.h loop.h sundries.h - - mount_common = fstab.c mount_mntent.c getusername.c lomount.c rmd160.c \ - $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \ - ../lib/blkdev.c $(fallback) - - - mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c - mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) + # generic sources for all programs (mount, umount, losetup) -srcs_common = sundries.c xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h ++srcs_common = sundries.c xmalloc.c ../lib/canonicalize.c sundries.h xmalloc.h rmd160.c + + # generic header for mount and umount + hdrs_mount = fstab.h mount_mntent.h mount_constants.h \ + lomount.h getusername.h loop.h + + # generic sources for mount and umount + srcs_mount = fstab.c mount_mntent.c getusername.c lomount.c devname.c devname.h \ + $(srcs_common) $(hdrs_mount) ../lib/env.c ../lib/linux_version.c \ + ../lib/blkdev.c ../lib/fsprobe.c + + # generic flags for all programs (except losetup) + # -- note that pkg-config autoconf macros (pkg.m4) does not differentiate + # between CFLAGS and CPPFLAGS, we follow this behaviour and use CFLAGS only. + ldadd_common = + ldadd_static = + cflags_common = + + # generic libtool options for all static programs + ldflags_static ="-all-static" + + mount_SOURCES = mount.c $(srcs_mount) ../lib/setproctitle.c + mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) $(cflags_common) mount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) + mount_LDADD = $(ldadd_common) - umount_SOURCES = umount.c $(mount_common) - umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) + umount_SOURCES = umount.c $(srcs_mount) + umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) $(cflags_common) umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) + umount_LDADD = $(ldadd_common) - swapon_SOURCES = swapon.c swap_constants.h $(utils_common) \ - ../lib/linux_version.c ../lib/blkdev.c + swapon_SOURCES = swapon.c swap_constants.h ../lib/linux_version.c \ + ../lib/blkdev.c ../lib/fsprobe.c ../lib/canonicalize.c + swapon_CFLAGS = $(cflags_common) + swapon_LDADD = $(ldadd_common) - losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ - loop.h lomount.h xmalloc.h sundries.h realpath.h rmd160.c $(fallback) + losetup_SOURCES = lomount.c $(srcs_common) loop.h lomount.h losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) - - mount_LDADD = $(LDADD_common) - umount_LDADD = $(LDADD_common) - swapon_LDADD = $(LDADD_common) - - LDADD_common = - LDADD_common_static = mount_static_LDADD = if HAVE_STATIC_MOUNT diff --cc mount/lomount.c index b7f32b7e,6b102925..88b033de --- a/mount/lomount.c +++ b/mount/lomount.c @@@ -23,13 -22,8 +23,12 @@@ #include "nls.h" #include "sundries.h" #include "xmalloc.h" - #include "realpath.h" #include "pathnames.h" +#ifndef HAVE_VERSIONSORT +# include "strverscmp.h" +#endif + #define SIZE(a) (sizeof(a)/sizeof(a[0])) #ifdef LOOP_SET_FD diff --cc mount/mount.c index 2c66015b,94fa94fb..f43adf33 --- a/mount/mount.c +++ b/mount/mount.c @@@ -92,9 -86,15 +92,18 @@@ static int restricted = 1 /* Contains the fd to read the passphrase from, if any. */ static int pfd = -1; +/* Contains the preferred keysize in bits we want to use */ +static int keysz = 0; + + /* mount(2) options */ + struct mountargs { + const char *spec; + const char *node; + const char *type; + int flags; + void *data; + }; + /* Map from -o and fstab option strings to the flag argument to mount(2). */ struct opt_map { const char *opt; /* option name */