search for: attrib_to_stat

Displaying 4 results from an estimated 4 matches for "attrib_to_stat".

2002 Oct 18
1
Patch: sftp client support of "ls [flags] [path [localfile]]" feature
...} + + if (fp) + fp1 = fp; + else + fp1 = stdout; if ((n = do_readdir(conn, path, &d)) != 0) + { + if (fp) fclose(fp); return (n); + } /* Count entries for sort */ for (n = 0; d[n] != NULL; n++) *************** *** 583,598 **** memset(&sb, 0, sizeof(sb)); attrib_to_stat(&d[n]->a, &sb); lname = ls_file(fname, &sb, 1); ! printf("%s\n", lname); xfree(lname); } else { /* XXX - multicolumn display would be nice here */ ! printf("%s\n", fname); } xfree(fname); } free_sftp_dirents(d); return (...
2023 May 10
2
SFTP support for subsecond times
...imum and just add both u32 variables to a separate sshbuf temporary variable and write that sshbuf as the value string with sshbuf_put_stringb(). I think subsecond time support could be implemented in all file attribs related protocol functions with the main changes involving the stat_to_attrib(), attrib_to_stat(), decode_attrib(), encode_attrib(), attrib_to_tv() and attrib_to_ts() functions mainly. This way, sftp servers/clients that don't understand this "nsec-times" extended attribute would just ignore it and keep working as up to now, while those who understand them could use them. Also...
2008 Jul 21
2
sftp needs a long time for sending a filelist
Hello all Im using sftp 1:4.7p1-8ubuntu1.2 in a batchjob Ive noticed that sftp needs a long time for sending a filelist. The timespan increases exponential if many files are on the remoteserver. for example "ls -la *.txt" needs 10 seconds for 2000 files but needs 50 seconds for 4000 files. For 150.000 Files i have to wait 15 minutes for example but the
2009 Feb 12
2
[patch 1/3] add protocol extension to ATTR message
...H2_FXE_EXTATTR_RDEV; + a->rdev = st->st_rdev; + } + a->ext_flags |= SSH2_FXE_EXTATTR_BLKSIZE; + a->blksize = st->st_blksize; + a->ext_flags |= SSH2_FXE_EXTATTR_BLOCKS; + a->blocks = st->st_blocks; } /* Convert from filexfer attribs to struct stat */ @@ -87,10 +123,62 @@ attrib_to_stat(const Attrib *a, struct s } if (a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) st->st_mode = a->perm; - if (a->flags & SSH2_FILEXFER_ATTR_ACMODTIME) { + if ((a->flags & SSH2_FILEXFER_ATTR_ACMODTIME) || + (a->ext_flags & SSH2_FXE_EXTATTR_ATIME)) st->st_...