utils_common = sundries.c xmalloc.c realpath.c fsprobe.c
- headers_common = fstab.h linux_fs.h mount_mntent.h mount_constants.h my_dev_t.h \
- mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.h \
+ headers_common = fstab.h mount_mntent.h mount_constants.h \
- mount_paths.h lomount.h fsprobe.h realpath.h xmalloc.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 \
+mount_common = fstab.c mount_mntent.c getusername.c lomount.c rmd160.c \
- $(utils_common) $(headers_common) ../lib/env.c
+ $(utils_common) $(headers_common) ../lib/env.c ../lib/linux_version.c \
+ ../lib/blkdev.c
mount_SOURCES = mount.c $(mount_common) ../lib/setproctitle.c
mount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS)
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 "fstab.h"
#include "lomount.h"
#include "loop.h"
- #include "linux_fs.h" /* for BLKGETSIZE */
#include "getusername.h"
-- #include "mount_paths.h"
#include "env.h"
#include "nls.h"
+ #include "blkdev.h"
+ #include "realpath.h"
#define DO_PS_FIDDLING
/* 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;
{ "options", 1, 0, 'o' },
{ "test-opts", 1, 0, 'O' },
{ "pass-fd", 1, 0, 'p' },
+ { "keybits", 1, 0, 'k' },
{ "types", 1, 0, 't' },
{ "bind", 0, 0, 128 },
- { "replace", 0, 0, 129 },
- { "after", 0, 0, 130 },
- { "before", 0, 0, 131 },
- { "over", 0, 0, 132 },
{ "move", 0, 0, 133 },
{ "guess-fstype", 1, 0, 134 },
{ "rbind", 0, 0, 135 },
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: