diff options
author | Prashanth Pai <ppai@redhat.com> | 2015-06-14 23:57:42 +0530 |
---|---|---|
committer | Thiago da Silva <thiago@redhat.com> | 2015-06-18 05:52:33 -0700 |
commit | ddbd7b570d0a9f599b417a499c912c5b13a003c9 (patch) | |
tree | 2dca993a300775af2367978c94ac34d7e332e3a1 /gluster/api.py | |
parent | 509abefca5902e4f0decf40368a90265d1a598bd (diff) |
Add missing Path based operation APIs
* Added commonly used path based operations that were missing from
the Volume class.
* Fixed function prototypes at places where it should be ssize_t
and not size_t. This caused overflow error at times.
* Added doc strings wherever they were missing.
Change-Id: I6ce28038da3cd0f89ab075045bb4092dd95e21c4
Signed-off-by: Prashanth Pai <ppai@redhat.com>
Diffstat (limited to 'gluster/api.py')
-rwxr-xr-x | gluster/api.py | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/gluster/api.py b/gluster/api.py index 560ede8..62135c5 100755 --- a/gluster/api.py +++ b/gluster/api.py @@ -320,26 +320,26 @@ glfs_fsync = ctypes.CFUNCTYPE( glfs_lseek = ctypes.CFUNCTYPE(ctypes.c_ulong, ctypes.c_void_p, ctypes.c_ulong, ctypes.c_int)(('glfs_lseek', client)) -glfs_read = ctypes.CFUNCTYPE(ctypes.c_size_t, +glfs_read = ctypes.CFUNCTYPE(ctypes.c_ssize_t, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_size_t, ctypes.c_int)(('glfs_read', client)) -glfs_write = ctypes.CFUNCTYPE(ctypes.c_size_t, +glfs_write = ctypes.CFUNCTYPE(ctypes.c_ssize_t, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_size_t, ctypes.c_int)(('glfs_write', client)) -glfs_getxattr = ctypes.CFUNCTYPE(ctypes.c_size_t, +glfs_getxattr = ctypes.CFUNCTYPE(ctypes.c_ssize_t, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_char_p, ctypes.c_void_p, ctypes.c_size_t)(('glfs_getxattr', client)) -glfs_listxattr = ctypes.CFUNCTYPE(ctypes.c_size_t, +glfs_listxattr = ctypes.CFUNCTYPE(ctypes.c_ssize_t, ctypes.c_void_p, ctypes.c_char_p, ctypes.c_void_p, @@ -423,6 +423,25 @@ glfs_flistxattr = ctypes.CFUNCTYPE(ctypes.c_ssize_t, ctypes.c_size_t)(('glfs_flistxattr', client)) +glfs_access = ctypes.CFUNCTYPE(ctypes.c_int, + ctypes.c_void_p, + ctypes.c_char_p, + ctypes.c_int)(('glfs_access', client)) + +glfs_readlink = ctypes.CFUNCTYPE(ctypes.c_int, + ctypes.c_void_p, + ctypes.c_char_p, + ctypes.c_char_p, + ctypes.c_size_t)(('glfs_readlink', client)) + +glfs_chdir = ctypes.CFUNCTYPE(ctypes.c_int, + ctypes.c_void_p, + ctypes.c_char_p)(('glfs_chdir', client)) + +glfs_getcwd = ctypes.CFUNCTYPE(ctypes.c_char_p, + ctypes.c_void_p, + ctypes.c_char_p, + ctypes.c_size_t)(('glfs_getcwd', client)) # TODO: creat and open fails on test_create_file_already_exists & test_open_file_not_exist functional testing, # noqa |