Minor bugfix to pending store operation counts.
[bluesky.git] / nfs3 / nfsd.c
index 7a0338d..d323fdb 100644 (file)
 #include <memory.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#include <glib.h>
+
+#include "bluesky.h"
 
 void register_rpc();
 
+BlueSkyFS *fs;
+BlueSkyStore *store;
+
 int main(int argc, char *argv[])
 {
+    int i;
+    bluesky_init();
+    g_set_prgname("nfsd");
+
+    const char *target = getenv("BLUESKY_TARGET");
+    if (target == NULL)
+        target = "s3";
+
+    store = bluesky_store_new(target);
+    fs = bluesky_init_fs("export", store);
+
     register_rpc();
 
-    svc_run ();
-    fprintf (stderr, "%s", "svc_run returned");
-    exit (1);
-    /* NOTREACHED */
+    bluesky_debug_dump(fs);
+
+    svc_run();
+    fprintf(stderr, "%s", "svc_run returned");
+    exit(1);
 }