diff options
author | irungentoo <irungentoo@gmail.com> | 2013-07-13 10:09:38 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-07-13 10:09:38 -0400 |
commit | d4fe483efd3e0062f12430efe9deb66d43d914d7 (patch) | |
tree | e6aa9ac716ae82cdb15c6e6cb5d9d1d9d29f053b /nacl/curvecp/savesync.c | |
parent | 835ef0320d47372eac14bef31c979b8217d04498 (diff) |
NaCl moved to other repo.
Diffstat (limited to 'nacl/curvecp/savesync.c')
-rw-r--r-- | nacl/curvecp/savesync.c | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/nacl/curvecp/savesync.c b/nacl/curvecp/savesync.c deleted file mode 100644 index 73074a4b..00000000 --- a/nacl/curvecp/savesync.c +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | #include <sys/types.h> | ||
2 | #include <sys/stat.h> | ||
3 | #include <fcntl.h> | ||
4 | #include <unistd.h> | ||
5 | #include "open.h" | ||
6 | #include "savesync.h" | ||
7 | #include "writeall.h" | ||
8 | |||
9 | static int writesync(int fd,const void *x,long long xlen) | ||
10 | { | ||
11 | if (writeall(fd,x,xlen) == -1) return -1; | ||
12 | return fsync(fd); | ||
13 | } | ||
14 | |||
15 | int savesync(const char *fn,const void *x,long long xlen) | ||
16 | { | ||
17 | int fd; | ||
18 | int r; | ||
19 | fd = open_write(fn); | ||
20 | if (fd == -1) return -1; | ||
21 | r = writesync(fd,x,xlen); | ||
22 | close(fd); | ||
23 | return r; | ||
24 | } | ||