src/dbfs/dbfs.c
changeset 30 d8fabd347a8e
parent 29 5de62ca9a5aa
child 31 7804cd7b5cd5
--- a/src/dbfs/dbfs.c	Thu Oct 16 22:04:53 2008 +0300
+++ b/src/dbfs/dbfs.c	Thu Oct 16 22:56:29 2008 +0300
@@ -4,7 +4,6 @@
 #include "dbfs.h"
 #include "../dbfs.h"
 #include "../lib/log.h"
-#include "../lib/misc.h"
 
 static struct fuse_lowlevel_ops dbfs_llops = {
 
@@ -15,6 +14,12 @@
 
     .getattr        = dbfs_getattr,
 
+    .open           = dbfs_open,
+    .read           = dbfs_read,
+    // .write       = dbfs_write,
+    .flush          = dbfs_flush,
+    .release        = dbfs_release,
+
     .opendir        = dbfs_opendir,
     .readdir        = dbfs_readdir,
     .releasedir     = dbfs_releasedir,
@@ -43,7 +48,7 @@
     event_base_loopbreak(ctx->ev_base);
 }
 
-struct dbfs *dbfs_open (struct event_base *ev_base, struct fuse_args *args, const char *db_conninfo) {
+struct dbfs *dbfs_new (struct event_base *ev_base, struct fuse_args *args, const char *db_conninfo) {
     struct dbfs *ctx = NULL;
 
     // alloc ctx
@@ -66,12 +71,12 @@
 
 error:
     if (ctx)
-        dbfs_release(ctx);
+        dbfs_free(ctx);
 
     return NULL;
 }    
 
-void dbfs_release (struct dbfs *ctx) {
+void dbfs_free (struct dbfs *ctx) {
     // cleanup
     if (ctx->ev_fuse) {
         evfuse_free(ctx->ev_fuse);