gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r5758 - gnunet-fuse


From: gnunet
Subject: [GNUnet-SVN] r5758 - gnunet-fuse
Date: Sun, 25 Nov 2007 05:05:48 -0700 (MST)

Author: grothoff
Date: 2007-11-25 05:05:48 -0700 (Sun, 25 Nov 2007)
New Revision: 5758

Modified:
   gnunet-fuse/directory.c
   gnunet-fuse/dirent.c
   gnunet-fuse/file.c
   gnunet-fuse/getattr.c
   gnunet-fuse/gnfs.h
   gnunet-fuse/main.c
   gnunet-fuse/mkdir.c
   gnunet-fuse/mknod.c
   gnunet-fuse/open.c
   gnunet-fuse/read.c
   gnunet-fuse/readdir.c
   gnunet-fuse/release.c
   gnunet-fuse/rename.c
   gnunet-fuse/rmdir.c
   gnunet-fuse/special_file.c
   gnunet-fuse/truncate.c
   gnunet-fuse/unlink.c
   gnunet-fuse/utimens.c
   gnunet-fuse/write.c
Log:
2nd round of renaming

Modified: gnunet-fuse/directory.c
===================================================================
--- gnunet-fuse/directory.c     2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/directory.c     2007-11-25 12:05:48 UTC (rev 5758)
@@ -47,7 +47,7 @@
        return GNUNET_OK;
 }
 
-static int dir_cache_cb(const ECRS_FileInfo *fi, const GNUNET_HashCode *key,
+static int dir_cache_cb(const GNUNET_ECRS_FileInfo *fi, const GNUNET_HashCode 
*key,
        int isRoot, void *data)
 {
        struct dirent *de, *deparent = data;
@@ -60,15 +60,15 @@
                return GNUNET_OK;
 
        /* Figure out the filename and type from metadata */
-       filename = ECRS_getFromMetaData(fi->meta, EXTRACTOR_FILENAME);
+       filename = GNUNET_ECRS_getFromMetaData(fi->meta, EXTRACTOR_FILENAME);
        if(filename == NULL)
        {
-               GE_LOG(ectx, GE_BULK | GE_USER | GE_WARNING,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GUSER | GNUNET_GWARNING,
                        "%s: dirent has no filename\n", __FUNCTION__);
                return GNUNET_OK;
        }
        len = strlen(filename);
-       if(ECRS_isDirectory(fi->meta) == GNUNET_YES)
+       if(GNUNET_ECRS_isDirectory(fi->meta) == GNUNET_YES)
        {
                if(filename[len - 1] == '/' || filename[len - 1] == '\\')
                        filename[len - 1] = '\0';
@@ -103,7 +103,7 @@
 
        /* Add it to the directory's list (steals our ref)*/
        GNUNET_mutex_lock(de->de_path_mutex);
-       GE_ASSERT(ectx,
+       GNUNET_GASSERT(ectx,
                !g_hash_table_lookup(deparent->de_dir_hash, de->de_basename));
        g_hash_table_replace(deparent->de_dir_hash, de->de_basename, de);
        GNUNET_mutex_unlock(de->de_path_mutex);
@@ -116,19 +116,19 @@
 
 static int directory_cache_locked(struct dirent *de)
 {
-       struct ECRS_MetaData *md;
+       struct GNUNET_ECRS_MetaData *md;
        void *mem;
        int ret;
        guint64 len;
 
-       len = ECRS_fileSize(de->de_fi.uri);
+       len = GNUNET_ECRS_fileSize(de->de_fi.uri);
        mem = GNUNET_malloc(len);
-       ret = ECRS_downloadPartialFile(ectx, cfg, de->de_fi.uri,
+       ret = GNUNET_ECRS_downloadPartialFile(ectx, cfg, de->de_fi.uri,
                "/dev/null", 0, len, anonymity, GNUNET_YES, dpcb, mem, tt,
                NULL);
        if(ret != GNUNET_OK)
        {
-               GE_LOG(ectx, GE_BULK | GE_USER | GE_ERROR,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GUSER | GNUNET_GERROR,
                        "%s: failed to download directory\n",
                        __FUNCTION__);
                GNUNET_free(mem);
@@ -136,11 +136,11 @@
        }
        de->de_dir_hash = g_hash_table_new_full(g_str_hash, g_str_equal, NULL,
                (GDestroyNotify)gn_dirent_put);
-       ECRS_listDirectory(ectx, mem, len, &md, dir_cache_cb, de);
+       GNUNET_ECRS_listDirectory(ectx, mem, len, &md, dir_cache_cb, de);
        GNUNET_free(mem);
-       ECRS_freeMetaData(md);
+       GNUNET_ECRS_freeMetaData(md);
        de->de_cached = 1;
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: cached %d entries\n", __FUNCTION__,
                g_hash_table_size(de->de_dir_hash));
        return 0;
@@ -224,7 +224,7 @@
        {
                if(directory_cache_locked(de) == -1)
                {
-                       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+                       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                                "%s: failed to cache parent dir\n",
                                __FUNCTION__);
                        gn_unlock_path(de, GN_UNLOCK_CLEAN);
@@ -265,7 +265,7 @@
        {
                if(directory_cache_locked(de) == -1)
                {
-                       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_ERROR,
+                       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GERROR,
                                "%s: failed to cache parent dir\n",
                                __FUNCTION__);
                        goto out_err;
@@ -277,7 +277,7 @@
        if(!g_hash_table_remove(de->de_dir_hash, dechild->de_basename))
        {
                GNUNET_mutex_unlock(dechild->de_path_mutex);
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_ERROR,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GERROR,
                        "%s: not found in dir_hash\n",
                        __FUNCTION__);
                goto out_err;
@@ -306,7 +306,7 @@
 
 struct dir_upload_data
 {
-       ECRS_FileInfo *fis;
+       GNUNET_ECRS_FileInfo *fis;
        int count;
        int failed;
 };
@@ -342,8 +342,8 @@
                        }
                }
        }
-       d->fis[d->count].uri = ECRS_dupUri(de->de_fi.uri);
-       d->fis[d->count].meta = ECRS_dupMetaData(de->de_fi.meta);
+       d->fis[d->count].uri = GNUNET_ECRS_dupUri(de->de_fi.uri);
+       d->fis[d->count].meta = GNUNET_ECRS_dupMetaData(de->de_fi.meta);
        d->count++;
 out:
        GNUNET_semaphore_up(de->de_sema);
@@ -358,7 +358,7 @@
        int i, ret, fd;
        char *buf, filename[] = GN_MKSTEMP_FILE;
        guint64 len;
-       struct ECRS_URI *uri;
+       struct GNUNET_ECRS_URI *uri;
        struct dir_upload_data d;
 
        /* We may be already clean */
@@ -372,24 +372,24 @@
        g_hash_table_find(de->de_dir_hash, dir_upload_callback, &d);
        if(d.failed)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_ERROR,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GERROR,
                        "%s: failed\n", __FUNCTION__);
                return -1;
        }
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: creating dir of %d elements\n", __FUNCTION__, d.count);
-       ret = ECRS_createDirectory(ectx, &buf, &len, d.count, d.fis,
+       ret = GNUNET_ECRS_createDirectory(ectx, &buf, &len, d.count, d.fis,
                de->de_fi.meta);
        for(i = 0; i < d.count; i++)
        {
-               ECRS_freeUri(d.fis[i].uri);
-               ECRS_freeMetaData(d.fis[i].meta);
+               GNUNET_ECRS_freeUri(d.fis[i].uri);
+               GNUNET_ECRS_freeMetaData(d.fis[i].meta);
        }
        GNUNET_free(d.fis);
        if(ret == GNUNET_SYSERR)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_ERROR,
-                       "%s: ECRS_createDirectory failed\n",
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GERROR,
+                       "%s: GNUNET_ECRS_createDirectory failed\n",
                        __FUNCTION__);
                return -1;
        }
@@ -398,30 +398,30 @@
        fd = mkstemp(filename);
        if(fd == -1)
        {
-               GE_LOG_STRERROR_FILE(ectx, GE_BULK | GE_DEVELOPER
-                       | GE_ERROR, "mkstemp", filename);
+               GNUNET_GLOG_STRERROR_FILE(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER
+                       | GNUNET_GERROR, "mkstemp", filename);
                return -1;
        }
        write(fd, buf, len);
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: wrote to %lld bytes to '%s'\n", __FUNCTION__, len,
                filename);
-       ret = ECRS_uploadFile(ectx, cfg, filename, GNUNET_NO, anonymity, 
priority,
+       ret = GNUNET_ECRS_uploadFile(ectx, cfg, filename, GNUNET_NO, anonymity, 
priority,
                -1, upcb, NULL, tt, NULL, &uri);
        close(fd);
        unlink(filename);
        if(ret == GNUNET_SYSERR)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_ERROR,
-                       "%s: ECRS_uploadFile failed\n", __FUNCTION__);
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GERROR,
+                       "%s: GNUNET_ECRS_uploadFile failed\n", __FUNCTION__);
                return -1;
        }
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: done\n", __FUNCTION__);
        /* Update the dirent info with our new URI and mark it clean */
        if(de->de_fi.uri != NULL)
-               ECRS_freeUri(de->de_fi.uri);
+               GNUNET_ECRS_freeUri(de->de_fi.uri);
        de->de_fi.uri = uri;
        de->de_dirty = 0;
        return 0;

Modified: gnunet-fuse/dirent.c
===================================================================
--- gnunet-fuse/dirent.c        2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/dirent.c        2007-11-25 12:05:48 UTC (rev 5758)
@@ -71,9 +71,9 @@
        GNUNET_mutex_destroy(de->de_refs_mutex);
        GNUNET_semaphore_destroy(de->de_sema);
        if(de->de_fi.uri != NULL)
-               ECRS_freeUri(de->de_fi.uri);
+               GNUNET_ECRS_freeUri(de->de_fi.uri);
        if(de->de_fi.meta != NULL)
-               ECRS_freeMetaData(de->de_fi.meta);
+               GNUNET_ECRS_freeMetaData(de->de_fi.meta);
        if(de->de_type == DE_DIR)
        {
                if(de->de_cached)
@@ -125,8 +125,8 @@
 /*
  * Create a new dirent with a reference, path and uri are copied
  */
-struct dirent *gn_dirent_new(const gchar *path, struct ECRS_URI *uri,
-       struct ECRS_MetaData *meta, gchar type)
+struct dirent *gn_dirent_new(const gchar *path, struct GNUNET_ECRS_URI *uri,
+       struct GNUNET_ECRS_MetaData *meta, gchar type)
 {
        struct dirent *de;
 
@@ -142,7 +142,7 @@
        {
                de->de_dirty = 0;
                de->de_cached = 0;
-               de->de_fi.uri = ECRS_dupUri(uri);
+               de->de_fi.uri = GNUNET_ECRS_dupUri(uri);
        }
        else
        {
@@ -163,9 +163,9 @@
                }
        }
        if(meta == NULL)
-               de->de_fi.meta = ECRS_createMetaData();
+               de->de_fi.meta = GNUNET_ECRS_createMetaData();
        else
-               de->de_fi.meta = ECRS_dupMetaData(meta);
+               de->de_fi.meta = GNUNET_ECRS_dupMetaData(meta);
        return de;
 }
 
@@ -180,7 +180,7 @@
        if(GNUNET_semaphore_down(path_sema, GNUNET_YES) == GNUNET_SYSERR)
                return;
        GNUNET_mutex_lock(de->de_path_mutex);
-       GE_ASSERT(ectx, !g_hash_table_lookup(path_hash, de->de_path));
+       GNUNET_GASSERT(ectx, !g_hash_table_lookup(path_hash, de->de_path));
        g_hash_table_replace(path_hash, de->de_path, de);
        GNUNET_mutex_unlock(de->de_path_mutex);
        gn_dirent_ref(de);
@@ -298,7 +298,7 @@
 {
        struct dirent *de = NULL;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: called for '%s'\n", __FUNCTION__, path);
        if(gn_path_foreach(path, dirent_find_callback, &de) == -1)
        {
@@ -332,7 +332,7 @@
        if(gn_path_foreach(path, lock_path_callback, &detmp) == -1)
        {
                GNUNET_free(path);
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_ERROR,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GERROR,
                        "%s: failed!\n", __FUNCTION__);
                /* Back out all the locks we aquired */
                if(detmp != NULL)
@@ -376,7 +376,7 @@
        if(gn_path_foreach(path, unlock_path_callback, &d) == -1)
        {
                GNUNET_free(path);
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_ERROR,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GERROR,
                        "%s: failed!\n", __FUNCTION__);
                return -1;
        }

Modified: gnunet-fuse/file.c
===================================================================
--- gnunet-fuse/file.c  2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/file.c  2007-11-25 12:05:48 UTC (rev 5758)
@@ -74,18 +74,18 @@
        de->de_fd = mkstemp(filename);
        if(de->de_fd == -1)
        {
-               GE_LOG_STRERROR_FILE(ectx, GE_BULK | GE_DEVELOPER
-                       | GE_ERROR, "mkstemp", filename);
+               GNUNET_GLOG_STRERROR_FILE(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER
+                       | GNUNET_GERROR, "mkstemp", filename);
                return -1;
        }
        de->de_filename = GNUNET_strdup(filename);
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: downloading '%s'\n", __FUNCTION__, de->de_filename);
-       if(ECRS_downloadFile(ectx, cfg, de->de_fi.uri, filename, anonymity,
+       if(GNUNET_ECRS_downloadFile(ectx, cfg, de->de_fi.uri, filename, 
anonymity,
                dpcb, NULL, tt, NULL) == GNUNET_SYSERR)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_ERROR,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GERROR,
                        "%s: download failed\n", __FUNCTION__);
                close(de->de_fd);
                unlink(de->de_filename);
@@ -100,21 +100,21 @@
 
 int gn_file_upload_locked(struct dirent *de)
 {
-       struct ECRS_URI *uri;
+       struct GNUNET_ECRS_URI *uri;
 
        /* If we're not dirty then we're done */
        if(!de->de_dirty)
                return 0;
 
-       if(ECRS_uploadFile(ectx, cfg, de->de_filename, GNUNET_NO, anonymity, 
priority,
+       if(GNUNET_ECRS_uploadFile(ectx, cfg, de->de_filename, GNUNET_NO, 
anonymity, priority,
                -1, upcb, NULL, tt, NULL, &uri) == GNUNET_SYSERR)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_ERROR,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GERROR,
                        "%s: upload failed\n", __FUNCTION__);
                return -1;
        }
        if(de->de_fi.uri != NULL)
-               ECRS_freeUri(de->de_fi.uri);
+               GNUNET_ECRS_freeUri(de->de_fi.uri);
        de->de_fi.uri = uri;
        de->de_cached = 0;
        de->de_dirty = 0;

Modified: gnunet-fuse/getattr.c
===================================================================
--- gnunet-fuse/getattr.c       2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/getattr.c       2007-11-25 12:05:48 UTC (rev 5758)
@@ -29,7 +29,7 @@
        struct dirent *de;
        int ret = 0;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: for '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: for '%s'\n",
                __FUNCTION__, path);
 
        /* Check to see if this is a special file */
@@ -47,7 +47,7 @@
        de = gn_dirent_find(path);
        if(de == NULL)
        {
-               GE_LOG(ectx, GE_BULK | GE_USER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GUSER | GNUNET_GDEBUG,
                        "%s: could not find path '%s'\n", __FUNCTION__, path);
                return -ENOENT;
        }
@@ -64,7 +64,7 @@
                if(ret == -1)
                {
                        ret = -errno;
-                       GE_LOG_STRERROR(ectx, GE_BULK | GE_USER | GE_ERROR,
+                       GNUNET_GLOG_STRERROR(ectx, GNUNET_GBULK | GNUNET_GUSER 
| GNUNET_GERROR,
                                "stat");
                        goto out;
                }
@@ -76,7 +76,7 @@
        stbuf->st_mode |= de->de_type == DE_DIR ? S_IFDIR : S_IFREG;
        stbuf->st_nlink = 1;
        if(de->de_fi.uri != NULL)
-               stbuf->st_size = ECRS_fileSize(de->de_fi.uri);
+               stbuf->st_size = GNUNET_ECRS_fileSize(de->de_fi.uri);
        else
                stbuf->st_size = 0;
 out:

Modified: gnunet-fuse/gnfs.h
===================================================================
--- gnunet-fuse/gnfs.h  2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/gnfs.h  2007-11-25 12:05:48 UTC (rev 5758)
@@ -59,7 +59,7 @@
        /* Dirty entires have been changed and not published in GNUnet (implies
         * cached) */
        gboolean de_dirty;
-       ECRS_FileInfo de_fi;
+       GNUNET_ECRS_FileInfo de_fi;
        union
        {
                /* For cached directories */
@@ -75,8 +75,8 @@
 
 typedef gboolean (*gn_dir_foreach_callback)(struct dirent *de, void *data);
 
-extern struct GC_Configuration *cfg;
-extern struct GE_Context *ectx;
+extern struct GNUNET_GC_Configuration *cfg;
+extern struct GNUNET_GContext *ectx;
 extern int closing;
 extern unsigned int anonymity;
 extern unsigned int priority;
@@ -84,8 +84,8 @@
 extern struct dirent *root_de;
 
 /* dirent.c */
-struct dirent *gn_dirent_new(const gchar *path, struct ECRS_URI *uri,
-       struct ECRS_MetaData *meta, gchar type);
+struct dirent *gn_dirent_new(const gchar *path, struct GNUNET_ECRS_URI *uri,
+       struct GNUNET_ECRS_MetaData *meta, gchar type);
 struct dirent *gn_dirent_get(const gchar *path);
 void gn_dirent_ref(struct dirent *de);
 void gn_dirent_put(struct dirent *de);

Modified: gnunet-fuse/main.c
===================================================================
--- gnunet-fuse/main.c  2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/main.c  2007-11-25 12:05:48 UTC (rev 5758)
@@ -30,8 +30,8 @@
 #include "gnfs.h"
 #include "gettext.h"
 
-struct GC_Configuration *cfg;
-struct GE_Context *ectx;
+struct GNUNET_GC_Configuration *cfg;
+struct GNUNET_GContext *ectx;
 static char *cfgFilename = DEFAULT_CLIENT_CONFIG_FILE;
 static char *cfgLogfile = "/tmp/gnunet_fuse.log";
 
@@ -108,7 +108,7 @@
 int main(int argc, char **argv)
 {
        int i, ret;
-       struct ECRS_URI *uri;
+       struct GNUNET_ECRS_URI *uri;
        char *buf;
 
        /* Initialize fuse options */
@@ -129,8 +129,8 @@
 
        /* Set up log file */
        GNUNET_disk_directory_create_for_file(ectx, cfgLogfile);
-       ectx = GE_create_context_logfile(ectx, GE_ALL, cfgLogfile, NULL, 
GNUNET_YES, 0);
-       GE_setDefaultContext(ectx);
+       ectx = GNUNET_Gcreate_context_logfile(ectx, GNUNET_GALL, cfgLogfile, 
NULL, GNUNET_YES, 0);
+       GNUNET_GsetDefaultContext(ectx);
 
        /* There should be exactly two extra arguments */
        if(i + 2 != argc)
@@ -163,7 +163,7 @@
                uribuf = GNUNET_malloc(len + 1);
                read(root_fd, uribuf, len);
                uribuf[len] = '\0';
-               uri = ECRS_stringToUri(ectx, uribuf);
+               uri = GNUNET_ECRS_stringToUri(ectx, uribuf);
                GNUNET_free(uribuf);
                if(uri == NULL)
                {
@@ -171,22 +171,22 @@
                        ret = -1;
                        goto out_close_root;
                }
-               if(!ECRS_isFileUri(uri))
+               if(!GNUNET_ECRS_isFileUri(uri))
                {
-                       struct ECRS_URI *new_uri;
+                       struct GNUNET_ECRS_URI *new_uri;
 
-                       new_uri = ECRS_getContentUri(uri);
+                       new_uri = GNUNET_ECRS_getContentUri(uri);
                        if(new_uri == NULL)
                        {
                                printf("URI cannot be mounted\n");
                                ret = -1;
                                goto out_close_root;
                        }
-                       ECRS_freeUri(uri);
+                       GNUNET_ECRS_freeUri(uri);
                        uri = new_uri;
                }
                root_de = gn_dirent_new(G_DIR_SEPARATOR_S, uri, NULL, DE_DIR);
-               ECRS_freeUri(uri);
+               GNUNET_ECRS_freeUri(uri);
        }
        else
        {
@@ -209,9 +209,9 @@
        fuse_argc++;
        fuse_argv[fuse_argc] = NULL;
 
-       GE_LOG(ectx, GE_BULK | GE_USER | GE_DEBUG, "calling fuse_main\n");
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GUSER | GNUNET_GDEBUG, "calling 
fuse_main\n");
        ret = fuse_main(fuse_argc, fuse_argv, &fops, NULL);
-       GE_LOG(ectx, GE_BULK | GE_USER | GE_DEBUG, "fuse_main returned\n");
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GUSER | GNUNET_GDEBUG, 
"fuse_main returned\n");
 
        /* Save root uri */
        closing = 1;

Modified: gnunet-fuse/mkdir.c
===================================================================
--- gnunet-fuse/mkdir.c 2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/mkdir.c 2007-11-25 12:05:48 UTC (rev 5758)
@@ -28,12 +28,12 @@
 int gn_mkdir(const char *path, mode_t mode)
 {
        struct dirent *de, *newde;
-       struct ECRS_MetaData *meta;
+       struct GNUNET_ECRS_MetaData *meta;
        char *parent, *file;
        int ret;
 
        (void)mode;
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: for '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: for '%s'\n",
                __FUNCTION__, path);
 
        /* Check for special file */
@@ -56,11 +56,11 @@
                GNUNET_free(parent);
                return -ENOENT;
        }
-       meta = ECRS_createMetaData();
-       ECRS_addToMetaData(meta, EXTRACTOR_FILENAME, file);
-       ECRS_addToMetaData(meta, EXTRACTOR_MIMETYPE, GNUNET_DIRECTORY_MIME);
+       meta = GNUNET_ECRS_createMetaData();
+       GNUNET_ECRS_addToMetaData(meta, EXTRACTOR_FILENAME, file);
+       GNUNET_ECRS_addToMetaData(meta, EXTRACTOR_MIMETYPE, 
GNUNET_DIRECTORY_MIME);
        newde = gn_dirent_new(path, NULL, meta, DE_DIR);
-       ECRS_freeMetaData(meta);
+       GNUNET_ECRS_freeMetaData(meta);
        ret = gn_directory_insert(de, newde);
        gn_dirent_put(de);
        gn_dirent_put(newde);

Modified: gnunet-fuse/mknod.c
===================================================================
--- gnunet-fuse/mknod.c 2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/mknod.c 2007-11-25 12:05:48 UTC (rev 5758)
@@ -28,13 +28,13 @@
 int gn_mknod(const char *path, mode_t mode, dev_t rdev)
 {
        struct dirent *de, *newde;
-       struct ECRS_URI *uri;
-       struct ECRS_MetaData *meta;
+       struct GNUNET_ECRS_URI *uri;
+       struct GNUNET_ECRS_MetaData *meta;
        char *parent, *file;
        int ret;
 
        (void)rdev;
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: for '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: for '%s'\n",
                __FUNCTION__, path);
 
        /* We only support regular files */
@@ -61,13 +61,13 @@
                GNUNET_free(parent);
                return -ENOENT;
        }
-       uri = ECRS_stringToUri(ectx, GN_EMPTY_FILE_URI);
-       meta = ECRS_createMetaData();
-       ECRS_addToMetaData(meta, EXTRACTOR_FILENAME, file);
+       uri = GNUNET_ECRS_stringToUri(ectx, GN_EMPTY_FILE_URI);
+       meta = GNUNET_ECRS_createMetaData();
+       GNUNET_ECRS_addToMetaData(meta, EXTRACTOR_FILENAME, file);
        GNUNET_free(parent);
        newde = gn_dirent_new(path, uri, meta, DE_FILE);
-       ECRS_freeMetaData(meta);
-       ECRS_freeUri(uri);
+       GNUNET_ECRS_freeMetaData(meta);
+       GNUNET_ECRS_freeUri(uri);
        ret = gn_directory_insert(de, newde);
        gn_dirent_put(de);
        gn_dirent_put(newde);

Modified: gnunet-fuse/open.c
===================================================================
--- gnunet-fuse/open.c  2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/open.c  2007-11-25 12:05:48 UTC (rev 5758)
@@ -29,7 +29,7 @@
 {
        struct dirent *de;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: for '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: for '%s'\n",
                __FUNCTION__, path);
        
        /* Check for special file */
@@ -48,7 +48,7 @@
                return -ENOENT;
        if(de->de_type != DE_FILE)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "%s: not a file\n", __FUNCTION__);
                gn_dirent_put(de);
                return -ENOENT;

Modified: gnunet-fuse/read.c
===================================================================
--- gnunet-fuse/read.c  2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/read.c  2007-11-25 12:05:48 UTC (rev 5758)
@@ -87,7 +87,7 @@
 
        (void)fi;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: called for '%s' %u bytes %lld offset\n", __FUNCTION__,
                path, size, offset);
 
@@ -114,13 +114,13 @@
        de = gn_dirent_find(path);
        if(de == NULL)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "%s: file not found\n", __FUNCTION__);
                return -ENOENT;
        }
        if(de->de_type != DE_FILE)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "%s: not a file\n", __FUNCTION__);
                size = -ENOENT;
                goto out;
@@ -139,7 +139,7 @@
                        size = slen;
                goto out_sema_up;
        }
-       len = ECRS_fileSize(de->de_fi.uri);
+       len = GNUNET_ECRS_fileSize(de->de_fi.uri);
        if((guint64)offset >= len)
        {
                size = 0;
@@ -152,11 +152,11 @@
        d.buf = buf;
        d.size = size;
        d.offset = offset;
-       ret = ECRS_downloadPartialFile(ectx, cfg, de->de_fi.uri, "/dev/null",
+       ret = GNUNET_ECRS_downloadPartialFile(ectx, cfg, de->de_fi.uri, 
"/dev/null",
                offset, size, anonymity, GNUNET_YES, dpcb, &d, tt, NULL);
        if(ret != GNUNET_OK)
        {
-               GE_LOG(ectx, GE_BULK | GE_USER | GE_ERROR,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GUSER | GNUNET_GERROR,
                        "%s: failed to download file\n", __FUNCTION__);
                size = -ENODATA;
        }

Modified: gnunet-fuse/readdir.c
===================================================================
--- gnunet-fuse/readdir.c       2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/readdir.c       2007-11-25 12:05:48 UTC (rev 5758)
@@ -69,18 +69,18 @@
        (void)offset;
        (void)fi;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "readdir for '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"readdir for '%s'\n",
                path);
        de = gn_dirent_find(path);
        if(de == NULL)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "readdir: file not found\n");
                return -ENOENT;
        }
        if(de->de_type != DE_DIR)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "readdir: not a directory\n");
                gn_dirent_put(de);
                ret = -ENOENT;

Modified: gnunet-fuse/release.c
===================================================================
--- gnunet-fuse/release.c       2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/release.c       2007-11-25 12:05:48 UTC (rev 5758)
@@ -27,7 +27,7 @@
        int dirty = GN_UNLOCK_CLEAN;
 
        (void)fi;
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: for '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: for '%s'\n",
                __FUNCTION__, path);
 
        /* Don't do anything for special files */
@@ -40,7 +40,7 @@
                return 0;
        if(de->de_type != DE_FILE)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "%s: not a file\n", __FUNCTION__);
                gn_dirent_put(de);
                return 0;

Modified: gnunet-fuse/rename.c
===================================================================
--- gnunet-fuse/rename.c        2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/rename.c        2007-11-25 12:05:48 UTC (rev 5758)
@@ -40,7 +40,7 @@
        char *from_parent, *from_file, *to_parent, *to_file;
        int ret = 0, empty = 1;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: '%s' to '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: '%s' to '%s'\n",
                __FUNCTION__, from, to);
 
        /* Check for special file */
@@ -88,7 +88,7 @@
        }
        gn_directory_remove(from_parent_de, from_de);
        gn_dirent_put(from_parent_de);
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: removed '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: removed '%s'\n",
                __FUNCTION__, from);
 
        /* Modify our path */
@@ -113,7 +113,7 @@
                        ret = -EIO;
                        goto out;
                }
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "%s: removed '%s'\n", __FUNCTION__, to);
        }
        if(gn_directory_insert(to_parent_de, from_de) == -1)
@@ -123,7 +123,7 @@
                goto out;
        }
        gn_dirent_put(to_parent_de);
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: inserted '%s'\n", __FUNCTION__, to);
 
 out:

Modified: gnunet-fuse/rmdir.c
===================================================================
--- gnunet-fuse/rmdir.c 2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/rmdir.c 2007-11-25 12:05:48 UTC (rev 5758)
@@ -40,7 +40,7 @@
        char *parent, *file;
        int ret, empty = 1;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: for '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: for '%s'\n",
                __FUNCTION__, path);
 
        /* Check for special file */

Modified: gnunet-fuse/special_file.c
===================================================================
--- gnunet-fuse/special_file.c  2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/special_file.c  2007-11-25 12:05:48 UTC (rev 5758)
@@ -104,7 +104,7 @@
                                goto out;
                        }
                }
-               buf = ECRS_uriToString(de->de_fi.uri);
+               buf = GNUNET_ECRS_uriToString(de->de_fi.uri);
                GNUNET_semaphore_up(de->de_sema);
                gn_dirent_put(de);
                buf = GNUNET_realloc(buf, strlen(buf) + 2);
@@ -147,7 +147,7 @@
                                }
                        }
                }
-               buf = ECRS_uriToString(de->de_fi.uri);
+               buf = GNUNET_ECRS_uriToString(de->de_fi.uri);
                GNUNET_semaphore_up(de->de_sema);
                gn_dirent_put(de);
                buf = GNUNET_realloc(buf, strlen(buf) + 2);

Modified: gnunet-fuse/truncate.c
===================================================================
--- gnunet-fuse/truncate.c      2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/truncate.c      2007-11-25 12:05:48 UTC (rev 5758)
@@ -28,7 +28,7 @@
        struct dirent *de;
        int ret = 0, dirty = GN_UNLOCK_CLEAN;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: called for '%s' %lld bytes\n", __FUNCTION__, path, size);
 
        /* Check for special file */
@@ -39,13 +39,13 @@
        de = gn_dirent_find(path);
        if(de == NULL)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "%s: file not found\n", __FUNCTION__);
                return -ENOENT;
        }
        if(de->de_type != DE_FILE)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "%s: not a file\n", __FUNCTION__);
                ret = -EISDIR;
                goto out;

Modified: gnunet-fuse/unlink.c
===================================================================
--- gnunet-fuse/unlink.c        2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/unlink.c        2007-11-25 12:05:48 UTC (rev 5758)
@@ -31,7 +31,7 @@
        char *parent, *file;
        int ret;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: for '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: for '%s'\n",
                __FUNCTION__, path);
 
        /* Check for special file */

Modified: gnunet-fuse/utimens.c
===================================================================
--- gnunet-fuse/utimens.c       2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/utimens.c       2007-11-25 12:05:48 UTC (rev 5758)
@@ -31,7 +31,7 @@
        struct timeval tv[2];
        int ret = 0;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG, "%s: for '%s'\n",
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG, 
"%s: for '%s'\n",
                __FUNCTION__, path);
 
        /* Check to see if this is a special file */
@@ -57,7 +57,7 @@
                if(ret == -1)
                {
                        ret = -errno;
-                       GE_LOG_STRERROR(ectx, GE_BULK | GE_USER | GE_ERROR,
+                       GNUNET_GLOG_STRERROR(ectx, GNUNET_GBULK | GNUNET_GUSER 
| GNUNET_GERROR,
                                "utimes");
                        goto out;
                }

Modified: gnunet-fuse/write.c
===================================================================
--- gnunet-fuse/write.c 2007-11-25 12:05:41 UTC (rev 5757)
+++ gnunet-fuse/write.c 2007-11-25 12:05:48 UTC (rev 5758)
@@ -33,7 +33,7 @@
 
        (void)fi;
 
-       GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+       GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | GNUNET_GDEBUG,
                "%s: called for '%s' %d bytes\n", __FUNCTION__, path, size);
 
        /* Check for special file */
@@ -44,13 +44,13 @@
        de = gn_dirent_find(path);
        if(de == NULL)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "%s: file not found\n", __FUNCTION__);
                return -ENOENT;
        }
        if(de->de_type != DE_FILE)
        {
-               GE_LOG(ectx, GE_BULK | GE_DEVELOPER | GE_DEBUG,
+               GNUNET_GLOG(ectx, GNUNET_GBULK | GNUNET_GDEVELOPER | 
GNUNET_GDEBUG,
                        "%s: not a file\n", __FUNCTION__);
                size = -ENOENT;
                goto out;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]