summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-13 15:09:17 +0100
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-12-13 15:09:17 +0100
commit65a7473f122c3cf169fa073e23eb7db304607d3b (patch)
tree493186eb92ffc27c21c47ddcf3f488eb2458c1cc
parenta77e7147c1814b4ed19d6abce417c8d8c627cc32 (diff)
downloadfastwriter-65a7473f122c3cf169fa073e23eb7db304607d3b.tar.gz
fastwriter-65a7473f122c3cf169fa073e23eb7db304607d3b.tar.bz2
fastwriter-65a7473f122c3cf169fa073e23eb7db304607d3b.tar.xz
fastwriter-65a7473f122c3cf169fa073e23eb7db304607d3b.zip
Compile-in default api descriptor
-rw-r--r--default.c7
-rw-r--r--default.h6
2 files changed, 7 insertions, 6 deletions
diff --git a/default.c b/default.c
index 693e157..8ff5135 100644
--- a/default.c
+++ b/default.c
@@ -30,6 +30,7 @@
#include "fastwriter.h"
#include "private.h"
#include "sysinfo.h"
+#include "default.h"
#define SYNC_MODE
#define HAVE_FALLOCATE
@@ -48,7 +49,7 @@ typedef struct {
} fastwriter_default_t;
-int fastwriter_open_default(fastwriter_t *fw, const char *name, fastwriter_flags_t flags) {
+int fastwriter_default_open(fastwriter_t *fw, const char *name, fastwriter_flags_t flags) {
int err;
char fs[16];
@@ -108,7 +109,7 @@ int fastwriter_open_default(fastwriter_t *fw, const char *name, fastwriter_flags
}
-void fastwriter_close_default(fastwriter_t *fw) {
+void fastwriter_default_close(fastwriter_t *fw) {
if (fw->ctx) {
fastwriter_default_t *ctx = (fastwriter_default_t*)fw->ctx;
@@ -127,7 +128,7 @@ void fastwriter_close_default(fastwriter_t *fw) {
}
-int fastwriter_write_default(fastwriter_t *fw, fastwriter_write_flags_t flags, size_t size, void *data, size_t *written) {
+int fastwriter_default_write(fastwriter_t *fw, fastwriter_write_flags_t flags, size_t size, void *data, size_t *written) {
size_t sum = 0;
ssize_t res;
fastwriter_default_t *ctx = (fastwriter_default_t*)fw->ctx;
diff --git a/default.h b/default.h
index 25f6556..b99d908 100644
--- a/default.h
+++ b/default.h
@@ -3,9 +3,9 @@
#include "private.h"
-int fastwriter_open_default(fastwriter_t *ctx, const char *name, fastwriter_flags_t flags);
-void fastwriter_close_default(fastwriter_t *ctx);
-int fastwriter_write_default(fastwriter_t *ctx, fastwriter_write_flags_t flags, size_t size, void *data, size_t *written);
+int fastwriter_default_open(fastwriter_t *ctx, const char *name, fastwriter_flags_t flags);
+void fastwriter_default_close(fastwriter_t *ctx);
+int fastwriter_default_write(fastwriter_t *ctx, fastwriter_write_flags_t flags, size_t size, void *data, size_t *written);
#ifdef _FASTWRITER_DEFAULT_C
fastwriter_api_t fastwriter_default_api = {