X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=ccan%2Fnfs%2Flibnfs-sync.c;h=12ed49e67ef0203d41380abe3ae77949c5be3e78;hb=42f0d95f79096702efbd79d8c422328078752302;hp=f8f98bc13a3b34afda99931b6e721e986af45bf7;hpb=f91748e6a99dfd3b6565aed4e98e84b4365eb9c2;p=ccan diff --git a/ccan/nfs/libnfs-sync.c b/ccan/nfs/libnfs-sync.c index f8f98bc1..12ed49e6 100644 --- a/ccan/nfs/libnfs-sync.c +++ b/ccan/nfs/libnfs-sync.c @@ -29,15 +29,15 @@ #include #include #include -#include "libnfs.h" +#include "nfs.h" #include "libnfs-raw.h" -#include "libnfs-raw-mount.h" -#include "libnfs-raw-nfs.h" +#include "rpc/mount.h" +#include "rpc/nfs.h" struct sync_cb_data { int is_finished; int status; - off_t offset; + nfs_off_t offset; void *return_data; int return_int; }; @@ -203,7 +203,7 @@ static void pread_cb(int status, struct nfs_context *nfs _U_, void *data, void * memcpy(buffer, (char *)data, status); } -int nfs_pread_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, off_t offset, size_t count, char *buffer) +int nfs_pread_sync(struct nfs_context *nfs, struct nfsfh *nfsfh, nfs_off_t offset, size_t count, char *buffer) { struct sync_cb_data cb_data; @@ -298,7 +298,7 @@ static void pwrite_cb(int status, struct nfs_context *nfs _U_, void *data, void } } -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) { struct sync_cb_data cb_data; @@ -372,7 +372,7 @@ static void ftruncate_cb(int status, struct nfs_context *nfs _U_, void *data, vo } } -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) { struct sync_cb_data cb_data; @@ -405,7 +405,7 @@ static void truncate_cb(int status, struct nfs_context *nfs _U_, void *data, voi } } -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) { struct sync_cb_data cb_data; @@ -623,11 +623,11 @@ static void lseek_cb(int status, struct nfs_context *nfs _U_, void *data, void * } if (cb_data->return_data != NULL) { - memcpy(cb_data->return_data, data, sizeof(off_t)); + memcpy(cb_data->return_data, data, sizeof(nfs_off_t)); } } -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) { struct sync_cb_data cb_data;