]> err.no Git - util-linux/commitdiff
Merge remote branch 'origin/master'
authorLaMont Jones <lamont@debian.org>
Mon, 6 Sep 2010 20:13:57 +0000 (14:13 -0600)
committerLaMont Jones <lamont@debian.org>
Mon, 6 Sep 2010 20:13:57 +0000 (14:13 -0600)
Conflicts:
mount/lomount.c

1  2 
login-utils/agetty.c
mount/lomount.c
mount/mount.8
mount/mount.c

Simple merge
diff --cc mount/lomount.c
index db6d53269bd0127dd1fbf62fef75b227ba1f1bda,03aae4b2aa4539af0fb0164ac9081ac488767132..00107d67a81d336328d927f48dfa58b78914252e
@@@ -972,14 -908,9 +977,15 @@@ usage(FILE *f) 
    " -p | --pass-fd <num>     read passphrase from file descriptor <num>\n"
    " -r | --read-only         setup read-only loop device\n"
    "      --show              print device name (with -f <file>)\n"
 +  " -N | --nohashpass        Do not hash the given password (Debian hashes)\n"
 +  " -k | --keybits <num>     specify number of bits in the hashed key given\n"
 +  "                          to the cipher.  Some ciphers support several key\n"
 +  "                          sizes and might be more efficient with a smaller\n"
 +  "                          key size.  Key sizes < 128 are generally not\n"
 +  "                          recommended\n"
    " -v | --verbose           verbose mode\n\n"));
-       exit(1);
+       exit(f == stderr ? EXIT_FAILURE : EXIT_SUCCESS);
   }
  
  int
@@@ -1048,13 -972,11 +1054,16 @@@ main(int argc, char **argv) 
                case 'f':
                        find = 1;
                        break;
+               case 'h':
+                       usage(stdout);
+                       break;
                case 'j':
                        assoc = optarg;
 +              case 'k':
 +                      keysize = optarg;
 +                      break;
 +              case 'N':
 +                      hash_pass = 0;
                        break;
                case 'o':
                        offset = optarg;
                res = show_loop(device);
        else {
                if (passfd && sscanf(passfd, "%d", &pfd) != 1)
-                       usage();
+                       usage(stderr);
 +              if (keysize && sscanf(keysize,"%d",&keysz) != 1)
-                       usage();
++                      usage(stderr);
                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"),
diff --cc mount/mount.8
Simple merge
diff --cc mount/mount.c
Simple merge