From: LaMont Jones Date: Fri, 30 Jan 2009 15:12:07 +0000 (-0700) Subject: Merge commit 'origin/stable/v2.14' into stable/v2.14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37ce2d507aadc9d2206d32f4aeda6a9d13f6da7a;p=util-linux Merge commit 'origin/stable/v2.14' into stable/v2.14 Conflicts: mount/mount.8 --- 37ce2d507aadc9d2206d32f4aeda6a9d13f6da7a diff --cc mount/lomount.c index 807c1460,f1d74820..f80ec72d --- a/mount/lomount.c +++ b/mount/lomount.c @@@ -634,10 -633,15 +634,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; @@@ -1098,13 -1021,11 +1108,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 39e84f5b,1a26c111..93eefc4a --- a/mount/mount.8 +++ b/mount/mount.8 @@@ -615,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