X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fnfs%2Fnfs.h;h=b6213bb40ca4c20a3386ea3da739f905fb92cadd;hp=ec4b6053c1ab97557a49c51759d158014ce73a6b;hb=a94286219597d8123188aaff0aaa55dba5104a05;hpb=05cdb20aa2d96ec05edd345aa1b7689aa26db87d diff --git a/ccan/nfs/nfs.h b/ccan/nfs/nfs.h index ec4b6053..b6213bb4 100644 --- a/ccan/nfs/nfs.h +++ b/ccan/nfs/nfs.h @@ -1,4 +1,6 @@ -/* +#ifndef CCAN_NFS_H +#define CCAN_NFS_H +/* Copyright (C) by Ronnie Sahlberg 2010 This program is free software; you can redistribute it and/or modify @@ -17,8 +19,11 @@ /* * This is the highlevel interface to access NFS resources using a posix-like interface */ +#include #include +typedef uint64_t nfs_off_t; + struct nfs_context; /* @@ -80,19 +85,19 @@ struct nfsfh; * 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. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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 - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_mount_sync(struct nfs_context *nfs, const char *server, const char *export); @@ -107,12 +112,12 @@ int nfs_mount_sync(struct nfs_context *nfs, const char *server, const char *expo * Async stat() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is struct stat * - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ struct stat; @@ -120,7 +125,7 @@ int nfs_stat_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *p /* * Sync stat() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_stat_sync(struct nfs_context *nfs, const char *path, struct stat *st); @@ -133,19 +138,19 @@ int nfs_stat_sync(struct nfs_context *nfs, const char *path, struct stat *st); * Async fstat(nfsfh *) * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is struct stat * - * -errno : An error occured. + * -errno : An error occurred. * 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 - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_fstat_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, struct stat *st); @@ -162,20 +167,20 @@ int nfs_fstat_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, struct stat *st * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is a struct *nfsfh; * The nfsfh is close using nfs_close(). - * -errno : An error occured. + * -errno : An error occurred. * 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() * Function returns - * 0 : The operation was successfull. *nfsfh is filled in. + * 0 : The operation was successful. *nfsfh is filled in. * -errno : The command failed. */ int nfs_open_sync(struct nfs_context *nfs, const char *path, int mode, struct nfsfh **nfsfh); @@ -191,19 +196,19 @@ int nfs_open_sync(struct nfs_context *nfs, const char *path, int mode, struct nf * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL. - * -errno : An error occured. + * -errno : An error occurred. * 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 - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_close_sync(struct nfs_context *nfs, struct nfsfh *nfsfh); @@ -217,23 +222,23 @@ int nfs_close_sync(struct nfs_context *nfs, struct nfsfh *nfsfh); * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * 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. - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ -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); /* * Sync pread() * Function returns * >=0 : numer of bytes read. - * -errno : An error occured. + * -errno : An error occurred. */ -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); @@ -245,13 +250,13 @@ int nfs_pread_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, s * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * 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. - * -errno : An error occured. + * -errno : An error occurred. * 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); @@ -259,7 +264,7 @@ int nfs_read_async(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, n * Sync read() * Function returns * >=0 : numer of bytes read. - * -errno : An error occured. + * -errno : An error occurred. */ int nfs_read_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf); @@ -274,22 +279,22 @@ int nfs_read_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, ch * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * >=0 : Success. * status is numer of bytes written. - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ -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); /* * Sync pwrite() * Function returns * >=0 : numer of bytes written. - * -errno : An error occured. + * -errno : An error occurred. */ -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); /* @@ -300,12 +305,12 @@ int nfs_pwrite_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * >=0 : Success. * status is numer of bytes written. - * -errno : An error occured. + * -errno : An error occurred. * 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); @@ -313,7 +318,7 @@ int nfs_write_async(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, * Sync write() * Function returns * >=0 : numer of bytes written. - * -errno : An error occured. + * -errno : An error occurred. */ int nfs_write_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, char *buf); @@ -326,22 +331,22 @@ int nfs_write_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, size_t count, c * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * >=0 : Success. - * data is off_t * for the current position. - * -errno : An error occured. + * data is nfs_off_t * for the current position. + * -errno : An error occurred. * data is the error string. */ -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); /* * Sync lseek() * Function returns * >=0 : numer of bytes read. - * -errno : An error occured. + * -errno : An error occurred. */ -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); /* @@ -352,11 +357,11 @@ int nfs_lseek_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, i * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ int nfs_fsync_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, void *private_data); @@ -364,7 +369,7 @@ int nfs_fsync_async(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_cb cb, voi * Sync fsync() * Function returns * 0 : Success - * -errno : An error occured. + * -errno : An error occurred. */ int nfs_fsync_sync(struct nfs_context *nfs, struct nfsfh *nfsfh); @@ -378,21 +383,21 @@ int nfs_fsync_sync(struct nfs_context *nfs, struct nfsfh *nfsfh); * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ -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); /* * Sync truncate() * Function returns * 0 : Success - * -errno : An error occured. + * -errno : An error occurred. */ -int nfs_truncate_sync(struct nfs_context *nfs, const char *path, off_t length); +int nfs_truncate_sync(struct nfs_context *nfs, const char *path, nfs_off_t length); @@ -404,21 +409,21 @@ int nfs_truncate_sync(struct nfs_context *nfs, const char *path, off_t length); * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ -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); /* * Sync ftruncate() * Function returns * 0 : Success - * -errno : An error occured. + * -errno : An error occurred. */ -int nfs_ftruncate_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t length); +int nfs_ftruncate_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t length); @@ -433,11 +438,11 @@ int nfs_ftruncate_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t lengt * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ int nfs_mkdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data); @@ -445,7 +450,7 @@ int nfs_mkdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void * * Sync mkdir() * Function returns * 0 : Success - * -errno : An error occured. + * -errno : An error occurred. */ int nfs_mkdir_sync(struct nfs_context *nfs, const char *path); @@ -459,11 +464,11 @@ int nfs_mkdir_sync(struct nfs_context *nfs, const char *path); * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ int nfs_rmdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data); @@ -471,7 +476,7 @@ int nfs_rmdir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void * * Sync rmdir() * Function returns * 0 : Success - * -errno : An error occured. + * -errno : An error occurred. */ int nfs_rmdir_sync(struct nfs_context *nfs, const char *path); @@ -486,12 +491,12 @@ int nfs_rmdir_sync(struct nfs_context *nfs, const char *path); * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is a struct *nfsfh; - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ int nfs_creat_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb cb, void *private_data); @@ -499,7 +504,7 @@ int nfs_creat_async(struct nfs_context *nfs, const char *path, int mode, nfs_cb * Sync creat() * Function returns * 0 : Success - * -errno : An error occured. + * -errno : An error occurred. */ int nfs_creat_sync(struct nfs_context *nfs, const char *path, int mode, struct nfsfh **nfsfh); @@ -515,12 +520,12 @@ int nfs_creat_sync(struct nfs_context *nfs, const char *path, int mode, struct n * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ int nfs_unlink_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data); @@ -528,7 +533,7 @@ int nfs_unlink_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void * Sync unlink() * Function returns * 0 : Success - * -errno : An error occured. + * -errno : An error occurred. */ int nfs_unlink_sync(struct nfs_context *nfs, const char *path); @@ -544,14 +549,14 @@ struct nfsdir; * * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * 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 * - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ int nfs_opendir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void *private_data); @@ -559,7 +564,7 @@ int nfs_opendir_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void * Sync opendir() * Function returns * 0 : Success - * -errno : An error occured. + * -errno : An error occurred. */ int nfs_opendir_sync(struct nfs_context *nfs, const char *path, struct nfsdir **nfsdir); @@ -597,12 +602,12 @@ void nfs_closedir(struct nfs_context *nfs, struct nfsdir *nfsdir); * Async statvfs() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is struct statvfs * - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ struct statvfs; @@ -610,7 +615,7 @@ int nfs_statvfs_async(struct nfs_context *nfs, const char *path, nfs_cb cb, void /* * Sync statvfs() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_statvfs_sync(struct nfs_context *nfs, const char *path, struct statvfs *svfs); @@ -623,13 +628,13 @@ int nfs_statvfs_sync(struct nfs_context *nfs, const char *path, struct statvfs * * Async readlink() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * 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 : An error occured. + * -errno : An error occurred. * data is the error string. */ struct statvfs; @@ -637,7 +642,7 @@ int nfs_readlink_async(struct nfs_context *nfs, const char *path, nfs_cb cb, voi /* * Sync readlink() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_readlink_sync(struct nfs_context *nfs, const char *path, char *buf, int bufsize); @@ -651,19 +656,19 @@ int nfs_readlink_sync(struct nfs_context *nfs, const char *path, char *buf, int * Async chmod() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_chmod_sync(struct nfs_context *nfs, const char *path, int mode); @@ -677,19 +682,19 @@ int nfs_chmod_sync(struct nfs_context *nfs, const char *path, int mode); * Async fchmod() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_fchmod_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int mode); @@ -703,19 +708,19 @@ int nfs_fchmod_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int mode); * Async chown() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_chown_sync(struct nfs_context *nfs, const char *path, int uid, int gid); @@ -729,19 +734,19 @@ int nfs_chown_sync(struct nfs_context *nfs, const char *path, int uid, int gid); * Async fchown() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_fchown_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int uid, int gid); @@ -756,19 +761,19 @@ int nfs_fchown_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, int uid, int g * Async utimes() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_utimes_sync(struct nfs_context *nfs, const char *path, struct timeval *times); @@ -781,12 +786,12 @@ int nfs_utimes_sync(struct nfs_context *nfs, const char *path, struct timeval *t * Async utime() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * data is the error string. */ struct utimbuf; @@ -794,7 +799,7 @@ int nfs_utime_async(struct nfs_context *nfs, const char *path, struct utimbuf *t /* * Sync utime() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_utime_sync(struct nfs_context *nfs, const char *path, struct utimbuf *times); @@ -809,19 +814,19 @@ int nfs_utime_sync(struct nfs_context *nfs, const char *path, struct utimbuf *ti * Async access() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_access_sync(struct nfs_context *nfs, const char *path, int mode); @@ -836,19 +841,19 @@ int nfs_access_sync(struct nfs_context *nfs, const char *path, int mode); * Async symlink() * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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() * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_symlink_sync(struct nfs_context *nfs, const char *oldpath, const char *newpath); @@ -861,19 +866,19 @@ int nfs_symlink_sync(struct nfs_context *nfs, const char *oldpath, const char *n * Async rename(, ) * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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(, ) * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_rename_sync(struct nfs_context *nfs, const char *oldpath, const char *newpath); @@ -887,19 +892,19 @@ int nfs_rename_sync(struct nfs_context *nfs, const char *oldpath, const char *ne * Async link(, ) * Function returns * 0 : The operation was initiated. Once the operation finishes, the callback will be invoked. - * <0 : An error occured when trying to set up the operation. The callback will not be invoked. + * <0 : An error occurred when trying to set up the operation. The callback will not be invoked. * * When the callback is invoked, status indicates the result: * 0 : Success. * data is NULL - * -errno : An error occured. + * -errno : An error occurred. * 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(, ) * Function returns - * 0 : The operation was successfull. + * 0 : The operation was successful. * -errno : The command failed. */ int nfs_link_sync(struct nfs_context *nfs, const char *oldpath, const char *newpath); @@ -907,4 +912,5 @@ int nfs_link_sync(struct nfs_context *nfs, const char *oldpath, const char *newp //qqq replace later with lseek(cur, 0) -off_t nfs_get_current_offset(struct nfsfh *nfsfh); +nfs_off_t nfs_get_current_offset(struct nfsfh *nfsfh); +#endif /* CCAN_NFS_H */