[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.222 and 1.223

version 1.222, 2022/09/19 10:46:00 version 1.223, 2022/12/16 03:40:03
Line 2383 
Line 2383 
         struct sftp_conn *conn;          struct sftp_conn *conn;
         size_t copy_buffer_len = 0;          size_t copy_buffer_len = 0;
         size_t num_requests = 0;          size_t num_requests = 0;
         long long limit_kbps = 0;          long long llv, limit_kbps = 0;
   
         /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */          /* Ensure that fds 0, 1 and 2 are open or directed to /dev/null */
         sanitise_stdfd();          sanitise_stdfd();
Line 2400 
Line 2400 
         infile = stdin;          infile = stdin;
   
         while ((ch = getopt(argc, argv,          while ((ch = getopt(argc, argv,
             "1246AafhNpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:")) != -1) {              "1246AafhNpqrvCc:D:i:l:o:s:S:b:B:F:J:P:R:X:")) != -1) {
                 switch (ch) {                  switch (ch) {
                 /* Passed through to ssh(1) */                  /* Passed through to ssh(1) */
                 case 'A':                  case 'A':
Line 2496 
Line 2496 
                 case 'S':                  case 'S':
                         ssh_program = optarg;                          ssh_program = optarg;
                         replacearg(&args, 0, "%s", ssh_program);                          replacearg(&args, 0, "%s", ssh_program);
                           break;
                   case 'X':
                           /* Please keep in sync with ssh.c -X */
                           if (strncmp(optarg, "buffer=", 7) == 0) {
                                   r = scan_scaled(optarg + 7, &llv);
                                   if (r == 0 && (llv <= 0 || llv > 256 * 1024)) {
                                           r = -1;
                                           errno = EINVAL;
                                   }
                                   if (r == -1) {
                                           fatal("Invalid buffer size \"%s\": %s",
                                                optarg + 7, strerror(errno));
                                   }
                                   copy_buffer_len = (size_t)llv;
                           } else if (strncmp(optarg, "nrequests=", 10) == 0) {
                                   llv = strtonum(optarg + 10, 1, 256 * 1024,
                                       &errstr);
                                   if (errstr != NULL) {
                                           fatal("Invalid number of requests "
                                               "\"%s\": %s", optarg + 10, errstr);
                                   }
                                   num_requests = (size_t)llv;
                           } else {
                                   fatal("Invalid -X option");
                           }
                         break;                          break;
                 case 'h':                  case 'h':
                 default:                  default:

Legend:
Removed from v.1.222  
changed lines
  Added in v.1.223