[BACK]Return to sftp.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / ssh

Diff for /src/usr.bin/ssh/sftp.c between version 1.107 and 1.108

version 1.107, 2009/02/02 11:15:14 version 1.108, 2009/08/12 00:13:00
Line 1622 
Line 1622 
         extern char *__progname;          extern char *__progname;
   
         fprintf(stderr,          fprintf(stderr,
             "usage: %s [-1Cv] [-B buffer_size] [-b batchfile] [-F ssh_config]\n"              "usage: %s [-1246Cqv] [-B buffer_size] [-b batchfile] [-c cipher]\n"
             "            [-o ssh_option] [-P sftp_server_path] [-R num_requests]\n"              "          [-F ssh_config] [-i identify_file] [-o ssh_option]\n"
             "            [-S program] [-s subsystem | sftp_server] host\n"              "          [-P sftp_server_path] [-R num_requests] [-S program]\n"
               "          [-s subsystem | sftp_server] host\n"
             "       %s [user@]host[:file ...]\n"              "       %s [user@]host[:file ...]\n"
             "       %s [user@]host[:dir[/]]\n"              "       %s [user@]host[:dir[/]]\n"
             "       %s -b batchfile [user@]host\n", __progname, __progname, __progname, __progname);              "       %s -b batchfile [user@]host\n",
               __progname, __progname, __progname, __progname);
         exit(1);          exit(1);
 }  }
   
Line 1658 
Line 1660 
         ll = SYSLOG_LEVEL_INFO;          ll = SYSLOG_LEVEL_INFO;
         infile = stdin;          infile = stdin;
   
         while ((ch = getopt(argc, argv, "1hvCo:s:S:b:B:F:P:R:")) != -1) {          while ((ch = getopt(argc, argv, "1246hqvCc:i:o:s:S:b:B:F:P:R:")) != -1) {
                 switch (ch) {                  switch (ch) {
                   /* Passed through to ssh(1) */
                   case '4':
                   case '6':
                 case 'C':                  case 'C':
                         addargs(&args, "-C");                          addargs(&args, "-%c", ch);
                         break;                          break;
                   /* Passed through to ssh(1) with argument */
                   case 'F':
                   case 'c':
                   case 'i':
                   case 'o':
                           addargs(&args, "-%c%s", ch, optarg);
                           break;
                   case 'q':
                           showprogress = 0;
                           addargs(&args, "-%c", ch);
                           break;
                 case 'v':                  case 'v':
                         if (debug_level < 3) {                          if (debug_level < 3) {
                                 addargs(&args, "-v");                                  addargs(&args, "-v");
Line 1670 
Line 1686 
                         }                          }
                         debug_level++;                          debug_level++;
                         break;                          break;
                 case 'F':  
                 case 'o':  
                         addargs(&args, "-%c%s", ch, optarg);  
                         break;  
                 case '1':                  case '1':
                         sshver = 1;                          sshver = 1;
                         if (sftp_server == NULL)                          if (sftp_server == NULL)
                                 sftp_server = _PATH_SFTP_SERVER;                                  sftp_server = _PATH_SFTP_SERVER;
                         break;                          break;
                 case 's':                  case '2':
                         sftp_server = optarg;                          sshver = 2;
                         break;                          break;
                 case 'S':                  case 'B':
                         ssh_program = optarg;                          copy_buffer_len = strtol(optarg, &cp, 10);
                         replacearg(&args, 0, "%s", ssh_program);                          if (copy_buffer_len == 0 || *cp != '\0')
                                   fatal("Invalid buffer size \"%s\"", optarg);
                         break;                          break;
                 case 'b':                  case 'b':
                         if (batchmode)                          if (batchmode)
Line 1701 
Line 1714 
                 case 'P':                  case 'P':
                         sftp_direct = optarg;                          sftp_direct = optarg;
                         break;                          break;
                 case 'B':  
                         copy_buffer_len = strtol(optarg, &cp, 10);  
                         if (copy_buffer_len == 0 || *cp != '\0')  
                                 fatal("Invalid buffer size \"%s\"", optarg);  
                         break;  
                 case 'R':                  case 'R':
                         num_requests = strtol(optarg, &cp, 10);                          num_requests = strtol(optarg, &cp, 10);
                         if (num_requests == 0 || *cp != '\0')                          if (num_requests == 0 || *cp != '\0')
                                 fatal("Invalid number of requests \"%s\"",                                  fatal("Invalid number of requests \"%s\"",
                                     optarg);                                      optarg);
                           break;
                   case 's':
                           sftp_server = optarg;
                           break;
                   case 'S':
                           ssh_program = optarg;
                           replacearg(&args, 0, "%s", ssh_program);
                         break;                          break;
                 case 'h':                  case 'h':
                 default:                  default:

Legend:
Removed from v.1.107  
changed lines
  Added in v.1.108