aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schneider <mail@cynapses.org>2010-02-24 00:26:20 +0100
committerAndreas Schneider <mail@cynapses.org>2010-02-24 00:27:02 +0100
commitec3af2c5cb8804205af05a46c998ba45f0463231 (patch)
tree79391c925b23b4bb4aef956eb726f72ead65e6a7
parentf857d4aff78fb79a532fe0b4f726d689d83a7917 (diff)
downloadlibssh-ec3af2c5cb8804205af05a46c998ba45f0463231.tar.gz
libssh-ec3af2c5cb8804205af05a46c998ba45f0463231.tar.xz
libssh-ec3af2c5cb8804205af05a46c998ba45f0463231.zip
Added printout of owner and group in the sftp example.
-rw-r--r--examples/samplesftp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/samplesftp.c b/examples/samplesftp.c
index 469ef362..a7428a5b 100644
--- a/examples/samplesftp.c
+++ b/examples/samplesftp.c
@@ -152,10 +152,12 @@ static void do_sftp(ssh_session session){
}
/* reading the whole directory, file by file */
while((file=sftp_readdir(sftp,dir))){
- fprintf(stderr, "%30s(%.8o) : %.5d.%.5d : %.10llu bytes\n",
+ fprintf(stderr, "%30s(%.8o) : %s(%.5d) %s(%.5d) : %.10llu bytes\n",
file->name,
file->permissions,
+ file->owner,
file->uid,
+ file->group,
file->gid,
(long long unsigned int) file->size);
sftp_attributes_free(file);