- dtucker@cvs.openbsd.org 2008/06/08 20:15:29
     [sftp.c sftp-client.c sftp-client.h]
     Have the sftp client store the statvfs replies in wire format,
     which prevents problems when the server's native sizes exceed the
     client's.
     Also extends the sizes of the remaining 32bit wire format to 64bit,
     they're specified as unsigned long in the standard.
diff --git a/sftp-client.h b/sftp-client.h
index b102e11..edb4679 100644
--- a/sftp-client.h
+++ b/sftp-client.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sftp-client.h,v 1.16 2008/04/18 12:32:11 djm Exp $ */
+/* $OpenBSD: sftp-client.h,v 1.17 2008/06/08 20:15:29 dtucker Exp $ */
 
 /*
  * Copyright (c) 2001-2004 Damien Miller <djm@openbsd.org>
@@ -30,6 +30,24 @@
 };
 
 /*
+ * Used for statvfs responses on the wire from the server, because the
+ * server's native format may be larger than the client's.
+ */
+struct sftp_statvfs {
+	u_int64_t f_bsize;
+	u_int64_t f_frsize;
+	u_int64_t f_blocks;
+	u_int64_t f_bfree;
+	u_int64_t f_bavail;
+	u_int64_t f_files;
+	u_int64_t f_ffree;
+	u_int64_t f_favail;
+	u_int64_t f_fsid;
+	u_int64_t f_flag;
+	u_int64_t f_namemax;
+};
+
+/*
  * Initialise a SSH filexfer connection. Returns NULL on error or
  * a pointer to a initialized sftp_conn struct on success.
  */
@@ -71,8 +89,7 @@
 char *do_realpath(struct sftp_conn *, char *);
 
 /* Get statistics for filesystem hosting file at "path" */
-struct statvfs;
-int do_statvfs(struct sftp_conn *, const char *, struct statvfs *, int);
+int do_statvfs(struct sftp_conn *, const char *, struct sftp_statvfs *, int);
 
 /* Rename 'oldpath' to 'newpath' */
 int do_rename(struct sftp_conn *, char *, char *);