Copyright (C) by Ronnie Sahlberg <ronniesahlberg@gmail.com> 2010
This program is free software; you can redistribute it and/or modify
Copyright (C) by Ronnie Sahlberg <ronniesahlberg@gmail.com> 2010
This program is free software; you can redistribute it and/or modify
* This function will try to connect to the server and mount the export.
* Function returns
* 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
* This function will try to connect to the server and mount the export.
* Function returns
* 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
* data is the error string.
*/
int nfs_mount_async(struct nfs_context *nfs, const char *server, const char *export, nfs_cb cb, void *private_data);
/*
* Sync nfs mount.
* Function returns
* data is the error string.
*/
int nfs_mount_async(struct nfs_context *nfs, const char *server, const char *export, nfs_cb cb, void *private_data);
/*
* Sync nfs mount.
* Function returns
* -errno : The command failed.
*/
int nfs_mount_sync(struct nfs_context *nfs, const char *server, const char *export);
* -errno : The command failed.
*/
int nfs_mount_sync(struct nfs_context *nfs, const char *server, const char *export);
* -errno : The command failed.
*/
int nfs_stat_sync(struct nfs_context *nfs, const char *path, struct stat *st);
* -errno : The command failed.
*/
int nfs_stat_sync(struct nfs_context *nfs, const char *path, struct stat *st);
* data is the error string.
*/
int nfs_fstat_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data);
/*
* Sync fstat(nfsfh *)
* Function returns
* data is the error string.
*/
int nfs_fstat_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data);
/*
* Sync fstat(nfsfh *)
* Function returns
* -errno : The command failed.
*/
int nfs_fstat_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, struct stat *st);
* -errno : The command failed.
*/
int nfs_fstat_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, struct stat *st);
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is a struct *nfsfh;
* The nfsfh is close using nfs_close().
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is a struct *nfsfh;
* The nfsfh is close using nfs_close().
* data is the error string.
*/
int nfs_open_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data);
/*
* Sync open(<filename>)
* Function returns
* data is the error string.
*/
int nfs_open_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data);
/*
* Sync open(<filename>)
* Function returns
* -errno : The command failed.
*/
int nfs_open_sync(struct nfs_context *nfs, const char *path, int mode, struct nfsfh **nfsfh);
* -errno : The command failed.
*/
int nfs_open_sync(struct nfs_context *nfs, const char *path, int mode, struct nfsfh **nfsfh);
* data is the error string.
*/
int nfs_close_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data);
/*
* Sync close(nfsfh)
* Function returns
* data is the error string.
*/
int nfs_close_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data);
/*
* Sync close(nfsfh)
* Function returns
* -errno : The command failed.
*/
int nfs_close_sync(struct nfs_context *nfs, struct nfsfh *nfsfh);
* -errno : The command failed.
*/
int nfs_close_sync(struct nfs_context *nfs, struct nfsfh *nfsfh);
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes read.
* data is a pointer to the returned data.
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes read.
* data is a pointer to the returned data.
-int nfs_pread_async(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, size_t count, nfs_cb cb, void *private_data);
+int nfs_pread_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, size_t count, nfs_cb cb, void *private_data);
-int nfs_pread_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, size_t count, char *buf);
+int nfs_pread_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, size_t count, char *buf);
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes read.
* data is a pointer to the returned data.
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes read.
* data is a pointer to the returned data.
* data is the error string.
*/
int nfs_read_async(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_read_async(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, nfs_cb cb, void *private_data);
*/
int nfs_read_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf);
*/
int nfs_read_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf);
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes written.
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes written.
-int nfs_pwrite_async(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, size_t count, char *buf, nfs_cb cb, void *private_data);
+int nfs_pwrite_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, size_t count, char *buf, nfs_cb cb, void *private_data);
-int nfs_pwrite_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, size_t count, char *buf);
+int nfs_pwrite_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, size_t count, char *buf);
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes written.
*
* When the callback is invoked, status indicates the result:
* >=0 : Success.
* status is numer of bytes written.
* data is the error string.
*/
int nfs_write_async(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_write_async(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf, nfs_cb cb, void *private_data);
*/
int nfs_write_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf);
*/
int nfs_write_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf);
-int nfs_lseek_async(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, int whence, nfs_cb cb, void *private_data);
+int nfs_lseek_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, int whence, nfs_cb cb, void *private_data);
-int nfs_lseek_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, int whence, off_t *current_offset);
+int nfs_lseek_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, int whence, nfs_off_t *current_offset);
* data is the error string.
*/
int nfs_fsync_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_fsync_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data);
-int nfs_truncate_async(struct nfs_context *nfs, const char *path, off_t length, nfs_cb cb, void *private_data);
+int nfs_truncate_async(struct nfs_context *nfs, const char *path, nfs_off_t length, nfs_cb cb, void *private_data);
-int nfs_ftruncate_async(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t length, nfs_cb cb, void *private_data);
+int nfs_ftruncate_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t length, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_mkdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_mkdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_rmdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_rmdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data);
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is a struct *nfsfh;
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is a struct *nfsfh;
* data is the error string.
*/
int nfs_creat_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_creat_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data);
*/
int nfs_creat_sync(struct nfs_context *nfs, const char *path, int mode, struct nfsfh **nfsfh);
*/
int nfs_creat_sync(struct nfs_context *nfs, const char *path, int mode, struct nfsfh **nfsfh);
* data is the error string.
*/
int nfs_unlink_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_unlink_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data);
*
* When struct nfsdir * is returned, this resource is closed/freed by calling nfs_closedir()
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is struct nfsdir *
*
* When struct nfsdir * is returned, this resource is closed/freed by calling nfs_closedir()
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is struct nfsdir *
* data is the error string.
*/
int nfs_opendir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data);
* data is the error string.
*/
int nfs_opendir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data);
* Async statvfs(<dirname>)
* Function returns
* 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
* Async statvfs(<dirname>)
* Function returns
* 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is struct statvfs *
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is struct statvfs *
* -errno : The command failed.
*/
int nfs_statvfs_sync(struct nfs_context *nfs, const char *path, struct statvfs *svfs);
* -errno : The command failed.
*/
int nfs_statvfs_sync(struct nfs_context *nfs, const char *path, struct statvfs *svfs);
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is a char *
* data is only valid during the callback and is automatically freed when the callback returns.
*
* When the callback is invoked, status indicates the result:
* 0 : Success.
* data is a char *
* data is only valid during the callback and is automatically freed when the callback returns.
* -errno : The command failed.
*/
int nfs_readlink_sync(struct nfs_context *nfs, const char *path, char *buf, int bufsize);
* -errno : The command failed.
*/
int nfs_readlink_sync(struct nfs_context *nfs, const char *path, char *buf, int bufsize);
* data is the error string.
*/
int nfs_chmod_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data);
/*
* Sync chmod(<name>)
* Function returns
* data is the error string.
*/
int nfs_chmod_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data);
/*
* Sync chmod(<name>)
* Function returns
* -errno : The command failed.
*/
int nfs_chmod_sync(struct nfs_context *nfs, const char *path, int mode);
* -errno : The command failed.
*/
int nfs_chmod_sync(struct nfs_context *nfs, const char *path, int mode);
* data is the error string.
*/
int nfs_fchmod_async(struct nfs_context *nfs, struct nfsfh *nfsfh, int mode, nfs_cb cb, void *private_data);
/*
* Sync fchmod(<handle>)
* Function returns
* data is the error string.
*/
int nfs_fchmod_async(struct nfs_context *nfs, struct nfsfh *nfsfh, int mode, nfs_cb cb, void *private_data);
/*
* Sync fchmod(<handle>)
* Function returns
* -errno : The command failed.
*/
int nfs_fchmod_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int mode);
* -errno : The command failed.
*/
int nfs_fchmod_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int mode);
* data is the error string.
*/
int nfs_chown_async(struct nfs_context *nfs, const char *path, int uid, int gid, nfs_cb cb, void *private_data);
/*
* Sync chown(<name>)
* Function returns
* data is the error string.
*/
int nfs_chown_async(struct nfs_context *nfs, const char *path, int uid, int gid, nfs_cb cb, void *private_data);
/*
* Sync chown(<name>)
* Function returns
* -errno : The command failed.
*/
int nfs_chown_sync(struct nfs_context *nfs, const char *path, int uid, int gid);
* -errno : The command failed.
*/
int nfs_chown_sync(struct nfs_context *nfs, const char *path, int uid, int gid);
* data is the error string.
*/
int nfs_fchown_async(struct nfs_context *nfs, struct nfsfh *nfsfh, int uid, int gid, nfs_cb cb, void *private_data);
/*
* Sync fchown(<handle>)
* Function returns
* data is the error string.
*/
int nfs_fchown_async(struct nfs_context *nfs, struct nfsfh *nfsfh, int uid, int gid, nfs_cb cb, void *private_data);
/*
* Sync fchown(<handle>)
* Function returns
* -errno : The command failed.
*/
int nfs_fchown_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int uid, int gid);
* -errno : The command failed.
*/
int nfs_fchown_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int uid, int gid);
* data is the error string.
*/
int nfs_utimes_async(struct nfs_context *nfs, const char *path, struct timeval *times, nfs_cb cb, void *private_data);
/*
* Sync utimes(<path>)
* Function returns
* data is the error string.
*/
int nfs_utimes_async(struct nfs_context *nfs, const char *path, struct timeval *times, nfs_cb cb, void *private_data);
/*
* Sync utimes(<path>)
* Function returns
* -errno : The command failed.
*/
int nfs_utimes_sync(struct nfs_context *nfs, const char *path, struct timeval *times);
* -errno : The command failed.
*/
int nfs_utimes_sync(struct nfs_context *nfs, const char *path, struct timeval *times);
* -errno : The command failed.
*/
int nfs_utime_sync(struct nfs_context *nfs, const char *path, struct utimbuf *times);
* -errno : The command failed.
*/
int nfs_utime_sync(struct nfs_context *nfs, const char *path, struct utimbuf *times);
* data is the error string.
*/
int nfs_access_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data);
/*
* Sync access(<path>)
* Function returns
* data is the error string.
*/
int nfs_access_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data);
/*
* Sync access(<path>)
* Function returns
* -errno : The command failed.
*/
int nfs_access_sync(struct nfs_context *nfs, const char *path, int mode);
* -errno : The command failed.
*/
int nfs_access_sync(struct nfs_context *nfs, const char *path, int mode);
* data is the error string.
*/
int nfs_symlink_async(struct nfs_context *nfs, const char *oldpath, const char *newpath, nfs_cb cb, void *private_data);
/*
* Sync symlink(<path>)
* Function returns
* data is the error string.
*/
int nfs_symlink_async(struct nfs_context *nfs, const char *oldpath, const char *newpath, nfs_cb cb, void *private_data);
/*
* Sync symlink(<path>)
* Function returns
* -errno : The command failed.
*/
int nfs_symlink_sync(struct nfs_context *nfs, const char *oldpath, const char *newpath);
* -errno : The command failed.
*/
int nfs_symlink_sync(struct nfs_context *nfs, const char *oldpath, const char *newpath);
* Async rename(<oldpath>, <newpath>)
* Function returns
* 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
* Async rename(<oldpath>, <newpath>)
* Function returns
* 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
* data is the error string.
*/
int nfs_rename_async(struct nfs_context *nfs, const char *oldpath, const char *newpath, nfs_cb cb, void *private_data);
/*
* Sync rename(<oldpath>, <newpath>)
* Function returns
* data is the error string.
*/
int nfs_rename_async(struct nfs_context *nfs, const char *oldpath, const char *newpath, nfs_cb cb, void *private_data);
/*
* Sync rename(<oldpath>, <newpath>)
* Function returns
* -errno : The command failed.
*/
int nfs_rename_sync(struct nfs_context *nfs, const char *oldpath, const char *newpath);
* -errno : The command failed.
*/
int nfs_rename_sync(struct nfs_context *nfs, const char *oldpath, const char *newpath);
* Async link(<oldpath>, <newpath>)
* Function returns
* 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
* Async link(<oldpath>, <newpath>)
* Function returns
* 0 : The operation was initiated. Once the operation finishes, the callback will be invoked.
* data is the error string.
*/
int nfs_link_async(struct nfs_context *nfs, const char *oldpath, const char *newpath, nfs_cb cb, void *private_data);
/*
* Sync link(<oldpath>, <newpath>)
* Function returns
* data is the error string.
*/
int nfs_link_async(struct nfs_context *nfs, const char *oldpath, const char *newpath, nfs_cb cb, void *private_data);
/*
* Sync link(<oldpath>, <newpath>)
* Function returns
* -errno : The command failed.
*/
int nfs_link_sync(struct nfs_context *nfs, const char *oldpath, const char *newpath);
* -errno : The command failed.
*/
int nfs_link_sync(struct nfs_context *nfs, const char *oldpath, const char *newpath);