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;
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()))
(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