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)
#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]))
- 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);
/* 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;
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: