repositories
/
deb_libnfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libnfs.c: add nfs_create
[deb_libnfs.git]
/
lib
/
libnfs-sync.c
diff --git
a/lib/libnfs-sync.c
b/lib/libnfs-sync.c
index 6e329f96af76f37b761a5f6e0a9ce529feca7646..39c68c6bf6fb12b0a345c839e79e2f09989ffe7f 100644
(file)
--- a/
lib/libnfs-sync.c
+++ b/
lib/libnfs-sync.c
@@
-29,6
+29,10
@@
#include "win32_compat.h"
#endif
#include "win32_compat.h"
#endif
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
#ifdef HAVE_NET_IF_H
#include <net/if.h>
#endif
#ifdef HAVE_NET_IF_H
#include <net/if.h>
#endif
@@
-49,10
+53,6
@@
#include <sys/ioctl.h>
#endif
#include <sys/ioctl.h>
#endif
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
#ifdef HAVE_POLL_H
#include <poll.h>
#endif
@@
-696,15
+696,15
@@
static void creat_cb(int status, struct nfs_context *nfs, void *data, void *priv
*nfsfh = fh;
}
*nfsfh = fh;
}
-int nfs_creat
(struct nfs_context *nfs, const char *path
, int mode, struct nfsfh **nfsfh)
+int nfs_creat
e(struct nfs_context *nfs, const char *path, int flags
, int mode, struct nfsfh **nfsfh)
{
struct sync_cb_data cb_data;
cb_data.is_finished = 0;
cb_data.return_data = nfsfh;
{
struct sync_cb_data cb_data;
cb_data.is_finished = 0;
cb_data.return_data = nfsfh;
- if (nfs_creat
_async(nfs, path
, mode, creat_cb, &cb_data) != 0) {
- nfs_set_error(nfs, "nfs_creat_async failed");
+ if (nfs_creat
e_async(nfs, path, flags
, mode, creat_cb, &cb_data) != 0) {
+ nfs_set_error(nfs, "nfs_creat
e
_async failed");
return -1;
}
return -1;
}
@@
-713,6
+713,11
@@
int nfs_creat(struct nfs_context *nfs, const char *path, int mode, struct nfsfh
return cb_data.status;
}
return cb_data.status;
}
+int nfs_creat(struct nfs_context *nfs, const char *path, int mode, struct nfsfh **nfsfh)
+{
+ return nfs_create(nfs, path, 0, mode, nfsfh);
+}
+
/*
* mknod()
*/
/*
* mknod()
*/