Print this page
4178 lofiadm usage message for the -a option is bogus
Reviewed by: Garrett D'Amore <garrett@damore.org>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/lofiadm/main.c
          +++ new/usr/src/cmd/lofiadm/main.c
↓ open down ↓ 58 lines elided ↑ open up ↑
  59   59  #include <sys/crypto/ioctladmin.h>
  60   60  #include "utils.h"
  61   61  #include <LzmaEnc.h>
  62   62  
  63   63  /* Only need the IV len #defines out of these files, nothing else. */
  64   64  #include <aes/aes_impl.h>
  65   65  #include <des/des_impl.h>
  66   66  #include <blowfish/blowfish_impl.h>
  67   67  
  68   68  static const char USAGE[] =
  69      -        "Usage: %s [-r] -a file [ device ] "
  70      -        " [-c aes-128-cbc|aes-192-cbc|aes-256-cbc|des3-cbc|blowfish-cbc]"
  71      -        " [-e] [-k keyfile] [-T [token]:[manuf]:[serial]:key]\n"
       69 +        "Usage: %s [-r] -a file [ device ]\n"
       70 +        "       %s [-r] -c crypto_algorithm -a file [device]\n"
       71 +        "       %s [-r] -c crypto_algorithm -k raw_key_file -a file [device]\n"
       72 +        "       %s [-r] -c crypto_algorithm -T [token]:[manuf]:[serial]:key "
       73 +        "-a file [device]\n"
       74 +        "       %s [-r] -c crypto_algorithm -T [token]:[manuf]:[serial]:key "
       75 +        "-k wrapped_key_file -a file [device]\n"
       76 +        "       %s [-r] -c crypto_algorithm -e -a file [device]\n"
  72   77          "       %s -d file | device\n"
  73   78          "       %s -C [gzip|gzip-6|gzip-9|lzma] [-s segment_size] file\n"
  74   79          "       %s -U file\n"
  75   80          "       %s [ file | device ]\n";
  76   81  
  77   82  typedef struct token_spec {
  78   83          char    *name;
  79   84          char    *mfr;
  80   85          char    *serno;
  81   86          char    *key;
↓ open down ↓ 62 lines elided ↑ open up ↑
 144  149  #define BLOCK_SIZE              512
 145  150  #define KILOBYTE                1024
 146  151  #define MEGABYTE                (KILOBYTE * KILOBYTE)
 147  152  #define GIGABYTE                (KILOBYTE * MEGABYTE)
 148  153  #define LIBZ                    "libz.so"
 149  154  
 150  155  static void
 151  156  usage(const char *pname)
 152  157  {
 153  158          (void) fprintf(stderr, gettext(USAGE), pname, pname, pname,
 154      -            pname, pname);
      159 +            pname, pname, pname, pname, pname, pname, pname);
 155  160          exit(E_USAGE);
 156  161  }
 157  162  
 158  163  static int
 159  164  gzip_compress(void *src, size_t srclen, void *dst, size_t *dstlen, int level)
 160  165  {
 161  166          static int (*compress2p)(void *, ulong_t *, void *, size_t, int) = NULL;
 162  167          void *libz_hdl = NULL;
 163  168  
 164  169          /*
↓ open down ↓ 1887 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX