From: LaMont Jones Date: Mon, 15 Dec 2008 14:31:01 +0000 (-0700) Subject: Merge commit 'origin/master' X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=846992a5d1bdfb21f824cf82697ad978ffc121a8;p=util-linux Merge commit 'origin/master' Conflicts: mount/mount.8 --- 846992a5d1bdfb21f824cf82697ad978ffc121a8 diff --cc mount/Makefile.am index 3592eb2a,7ff528ca..aa9f2008 --- a/mount/Makefile.am +++ b/mount/Makefile.am @@@ -24,10 -24,11 +24,11 @@@ umount_SOURCES = umount.c $(mount_commo umount_CFLAGS = $(SUID_CFLAGS) $(AM_CFLAGS) umount_LDFLAGS = $(SUID_LDFLAGS) $(AM_LDFLAGS) - swapon_SOURCES = swapon.c swap_constants.h $(utils_common) + swapon_SOURCES = swapon.c swap_constants.h $(utils_common) \ + ../lib/linux_version.c ../lib/blkdev.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 a6ae55ff,5675eac0..7371c4ea --- a/mount/lomount.c +++ b/mount/lomount.c @@@ -646,10 -645,15 +646,16 @@@ digits_only(const char *s) return 1; } + /* + * return codes: + * 0 - success + * 1 - error + * 2 - error (EBUSY) + */ int set_loop(const char *device, const char *file, unsigned long long offset, - unsigned long long sizelimit, const char *encryption, int pfd, int *options) { + unsigned long long sizelimit, const char *encryption, int pfd, int *options, + int keysz, int hash_pass) { struct loop_info64 loopinfo64; int fd, ffd, mode, i; char *pass; @@@ -1102,13 -1025,11 +1112,13 @@@ main(int argc, char **argv) else { if (passfd && sscanf(passfd, "%d", &pfd) != 1) usage(); + if (keysize && sscanf(keysize,"%d",&keysz) != 1) + usage(); do { - res = set_loop(device, file, off, slimit, encryption, pfd, &ro); + res = set_loop(device, file, off, slimit, encryption, pfd, &ro, keysz, hash_pass); if (res == 2 && find) { if (verbose) - printf("stolen loop=%s...trying again\n", + printf(_("stolen loop=%s...trying again\n"), device); free(device); if (!(device = find_unused_loop_device())) diff --cc mount/mount.8 index 5fb027d8,8905599e..3a777466 --- a/mount/mount.8 +++ b/mount/mount.8 @@@ -630,16 -761,11 +761,21 @@@ This option implies the option (unless overridden by subsequent options, as in the option line .BR group,dev,suid ). .TP +.B encryption +Specifies an encryption algorithm to use. Used in conjunction with the +.BR loop " option." +.TP +.B keybits +Specifies the key size to use for an encryption algorithm. Used in conjunction +with the +.BR loop " and " encryption " options." +.B nofail +Do not report errors for this device if it does not exist. + .B iversion + Every time the inode is modified, the i_version field will be incremented. + .TP + .B noiversion + Do not increment the i_version inode field. .TP .B mand Allow mandatory locks on this filesystem. See