/* ----------------------------------------------------------------------
* Higher-level helper functions used in commands.
/* ----------------------------------------------------------------------
* Higher-level helper functions used in commands.
if (!(subset & 06777) && (perms &~ subset)) {
printf("chmod: file mode '%.*s' contains no user/group/other"
" specifier and permissions other than 't' \n",
if (!(subset & 06777) && (perms &~ subset)) {
printf("chmod: file mode '%.*s' contains no user/group/other"
" specifier and permissions other than 't' \n",
- strcspn(modebegin, ","), modebegin, *mode);
+ strcspn(modebegin, ","), modebegin);
static unsigned outlen; /* how much data required */
static unsigned char *pending = NULL; /* any spare data */
static unsigned pendlen = 0, pendsize = 0; /* length and phys. size of buffer */
static unsigned outlen; /* how much data required */
static unsigned char *pending = NULL; /* any spare data */
static unsigned pendlen = 0, pendsize = 0; /* length and phys. size of buffer */
-int from_backend(void *frontend, int is_stderr, char *data, int datalen)
+int from_backend(void *frontend, int is_stderr, const char *data, int datalen)
- err = back->init(NULL, &backhandle, cfg.host, cfg.port, &realhost, 0);
+ err = back->init(NULL, &backhandle, &cfg, cfg.host, cfg.port, &realhost,0);
ssh_sftp_init();
if (verbose && realhost != NULL)
printf("Connected to %s\n", realhost);
ssh_sftp_init();
if (verbose && realhost != NULL)
printf("Connected to %s\n", realhost);
- ret = cmdline_process_param(argv[i], i+1<argc?argv[i+1]:NULL, 1);
+ ret = cmdline_process_param(argv[i], i+1<argc?argv[i+1]:NULL, 1, &cfg);