From: LaMont Jones Date: Fri, 26 Oct 2007 12:48:18 +0000 (-0600) Subject: Merge commit 'origin/master' X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4f3b9d4acca24271d3e2ababf7d91a0a77b94027;p=util-linux Merge commit 'origin/master' Conflicts: mount/Makefile.am mount/mount.c --- 4f3b9d4acca24271d3e2ababf7d91a0a77b94027 diff --cc mount/Makefile.am index 41ae3fb0,46bcb5ab..f4430009 --- a/mount/Makefile.am +++ b/mount/Makefile.am @@@ -25,7 -25,8 +25,8 @@@ umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_L swapon_SOURCES = swapon.c swap_constants.h $(utils_common) - losetup_SOURCES = lomount.c loop.h lomount.h rmd160.c + losetup_SOURCES = lomount.c sundries.c xmalloc.c realpath.c \ - loop.h lomount.h xmalloc.h sundries.h realpath.h ++ loop.h lomount.h xmalloc.h sundries.h realpath.h rmd160.c losetup_CPPFLAGS = -DMAIN $(AM_CPPFLAGS) mount_LDADD = $(LDADD_common) diff --cc mount/lomount.c index 69107910,5bd89540..74c6f680 --- a/mount/lomount.c +++ b/mount/lomount.c @@@ -20,14 -20,11 +20,12 @@@ #include "loop.h" #include "lomount.h" +#include "rmd160.h" #include "xstrncpy.h" #include "nls.h" - - extern int verbose; - extern char *progname; - extern char *xstrdup (const char *s); /* not: #include "sundries.h" */ - extern void error (const char *fmt, ...); /* idem */ + #include "sundries.h" + #include "xmalloc.h" + #include "realpath.h" #define SIZE(a) (sizeof(a)/sizeof(a[0])) diff --cc mount/lomount.h index a042d98f,38b3a483..724bed1e --- a/mount/lomount.h +++ b/mount/lomount.h @@@ -1,6 -1,5 +1,5 @@@ - extern int verbose; extern int set_loop(const char *, const char *, unsigned long long, - const char *, int, int *); + const char *, int, int *, int, int); extern int del_loop(const char *); extern int is_loop_device(const char *); extern char * find_unused_loop_device(void); diff --cc mount/mount.c index 2d23a72f,9d43e5ff..43824c35 --- a/mount/mount.c +++ b/mount/mount.c @@@ -64,14 -62,8 +62,14 @@@ static int nomtab = 0 /* True for explicit readonly (-r). */ static int readonly = 0; +/* Nonzero for chatty (-v). */ +int verbose = 0; + +/* Do we hash the password or not */ +int hash_pass = 1; + /* Nonzero for sloppy (-s). */ - int sloppy = 0; + static int sloppy = 0; /* True for explicit read/write (-w). */ static int readwrite = 0; @@@ -1994,8 -2017,7 +2037,9 @@@ main(int argc, char *argv[]) create_mtab (); } + if (keysize && sscanf(keysize,"%d",&keysz) != 1) + die (EX_USAGE, _("mount: argument to --keybits or -k must be a number")); + atexit(unlock_mtab); switch (argc+specseen) { case 0: