Displaying 2 results from an estimated 2 matches for "process_extended_statvfs".
2006 Aug 17
0
[RFC] proposed extensions for SFTP
...buffer_put_int64(&msg, st->f_favail);
+ buffer_put_int(&msg, st->f_fsid);
+ buffer_put_int(&msg, flag);
+ buffer_put_int(&msg, st->f_namemax);
+ send_msg(&msg);
+ buffer_free(&msg);
+}
+
/* parse incoming */
static void
@@ -1049,6 +1079,24 @@
}
static void
+process_extended_statvfs(u_int32_t id)
+{
+ char *path;
+ struct statvfs st;
+ int ret;
+
+ path = get_string(NULL);
+ debug3("request %u: statvfs", id);
+ verbose("statvfs \"%s\"", path);
+
+ ret = statvfs(path, &st);
+ if (ret == -1)
+ send_status(id, errno_to_portable(errno));
+ else
+...
2009 Feb 12
2
[patch] hard link protocol extension for sftp
...\"", oldpath, newpath);
+ if (link(oldpath, newpath) == -1)
+ send_status(id, errno_to_portable(errno));
+ else
+ send_status(id, SSH2_FX_OK);
+ xfree(oldpath);
+ xfree(newpath);
+}
+
+static void
process_extended(void)
{
u_int32_t id;
@@ -1166,6 +1186,8 @@ process_extended(void)
process_extended_statvfs(id);
else if (strcmp(request, "fstatvfs at openssh.com") == 0)
process_extended_fstatvfs(id);
+ else if (strcmp(request, "link at openssh.com") == 0)
+ process_extended_link(id);
else
send_status(id, SSH2_FX_OP_UNSUPPORTED); /* MUST */
xfree(request);
Index: ssh/sft...