geom_gate userland utility improvements
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

80 lines
2.7 KiB

  1. .TH libssh2_sftp_statvfs 3 "22 May 2010" "libssh2 1.2.6" "libssh2 manual"
  2. .SH NAME
  3. libssh2_sftp_statvfs, libssh2_sftp_fstatvfs - get file system statistics
  4. .SH SYNOPSIS
  5. .nf
  6. #include <libssh2.h>
  7. #include <libssh2_sftp.h>
  8. int
  9. libssh2_sftp_statvfs(LIBSSH2_SFTP *sftp, const char *path,
  10. size_t path_len, LIBSSH2_SFTP_STATVFS *st);
  11. int
  12. libssh2_sftp_fstatvfs(LIBSSH2_SFTP_HANDLE *handle,
  13. LIBSSH2_SFTP_STATVFS *st)
  14. .fi
  15. .SH DESCRIPTION
  16. These functions provide statvfs(2)-like operations and require
  17. statvfs@openssh.com and fstatvfs@openssh.com extension support on the server.
  18. \fIsftp\fP - SFTP instance as returned by
  19. .BR libssh2_sftp_init(3)
  20. \fIhandle\fP - SFTP File Handle as returned by
  21. .BR libssh2_sftp_open_ex(3)
  22. \fIpath\fP - full path of any file within the mounted file system.
  23. \fIpath_len\fP - length of the full path.
  24. \fIst\fP - Pointer to a LIBSSH2_SFTP_STATVFS structure to place file system
  25. statistics into.
  26. .SH DATA TYPES
  27. LIBSSH2_SFTP_STATVFS is a typedefed struct that is defined as below
  28. .nf
  29. struct _LIBSSH2_SFTP_STATVFS {
  30. libssh2_uint64_t f_bsize; /* file system block size */
  31. libssh2_uint64_t f_frsize; /* fragment size */
  32. libssh2_uint64_t f_blocks; /* size of fs in f_frsize units */
  33. libssh2_uint64_t f_bfree; /* # free blocks */
  34. libssh2_uint64_t f_bavail; /* # free blocks for non-root */
  35. libssh2_uint64_t f_files; /* # inodes */
  36. libssh2_uint64_t f_ffree; /* # free inodes */
  37. libssh2_uint64_t f_favail; /* # free inodes for non-root */
  38. libssh2_uint64_t f_fsid; /* file system ID */
  39. libssh2_uint64_t f_flag; /* mount flags */
  40. libssh2_uint64_t f_namemax; /* maximum filename length */
  41. };
  42. .fi
  43. It is unspecified whether all members of the returned struct have meaningful
  44. values on all file systems.
  45. The field \fIf_flag\fP is a bit mask. Bits are defined as follows:
  46. .IP LIBSSH2_SFTP_ST_RDONLY
  47. Read-only file system.
  48. .IP LIBSSH2_SFTP_ST_NOSUID
  49. Set-user-ID/set-group-ID bits are ignored by \fBexec\fP(3).
  50. .SH RETURN VALUE
  51. Returns 0 on success or negative on failure. If used in non-blocking mode, it
  52. returns LIBSSH2_ERROR_EAGAIN when it would otherwise block. While
  53. LIBSSH2_ERROR_EAGAIN is a negative number, it isn't really a failure per se.
  54. .SH ERRORS
  55. \fILIBSSH2_ERROR_ALLOC\fP - An internal memory allocation call failed.
  56. \fILIBSSH2_ERROR_SOCKET_SEND\fP - Unable to send data on socket.
  57. \fILIBSSH2_ERROR_SOCKET_TIMEOUT\fP -
  58. \fILIBSSH2_ERROR_SFTP_PROTOCOL\fP - An invalid SFTP protocol response was
  59. received on the socket, or an SFTP operation caused an errorcode to be returned
  60. by the server.
  61. .SH AVAILABILITY
  62. Added in libssh2 1.2.6
  63. .SH SEE ALSO
  64. .BR libssh2_sftp_open_ex(3)