summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.am4
-rw-r--r--client/Makefile.am66
-rw-r--r--client/gvfsfusedaemon.c (renamed from fuse/gvfsfusedaemon.c)22
-rw-r--r--configure.ac2
-rw-r--r--fuse/Makefile.am19
5 files changed, 71 insertions, 42 deletions
diff --git a/Makefile.am b/Makefile.am
index fe051940..e3b304ec 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,10 +16,6 @@ SUBDIRS = \
programs \
$(NULL)
-if USE_FUSE
-SUBDIRS += fuse
-endif
-
DISTCHECK_CONFIGURE_FLAGS = --enable-gtk-doc
pkgconfigdir = $(libdir)/pkgconfig
diff --git a/client/Makefile.am b/client/Makefile.am
index 6b4ec290..ba66a081 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -7,13 +7,12 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gvfs \
-DGVFS_MODULE_DIR=\"$(libdir)/gvfs/modules\" \
-DDBUS_API_SUBJECT_TO_CHANGE
-giomodule_flags = -export_dynamic -avoid-version -module -no-undefined
+module_flags = -export_dynamic -avoid-version -module -no-undefined
giomodulesdir = $(libdir)/gio/gvfs-modules
-giomodules_LTLIBRARIES = libgvfsdbus.la
+## Common to dynamic and static client libs
-libgvfsdbus_la_LDFLAGS = $(module_flags)
-libgvfsdbus_la_SOURCES = \
+vfssources = \
gdaemonvfs.c gdaemonvfs.h \
gdaemonvolume.c gdaemonvolume.h \
gdaemonvolumemonitor.c gdaemonvolumemonitor.h \
@@ -25,15 +24,25 @@ libgvfsdbus_la_SOURCES = \
gvfsdaemondbus.c \
$(NULL)
-libgvfsdbus_la_LIBADD = \
- $(top_builddir)/gio/libgio.la \
- $(top_builddir)/common/libgvfscommon.la \
- $(DBUS_LIBS) \
- $(GLIB_LIBS)
+vfslibs = \
+ $(top_builddir)/gio/libgio.la \
+ $(top_builddir)/common/libgvfscommon.la \
+ $(DBUS_LIBS) \
+ $(GLIB_LIBS) \
+ $(NULL)
+
+## Dynamic client lib
+
+giomodules_LTLIBRARIES = libgvfsdbus.la
+
+libgvfsdbus_la_LDFLAGS = $(module_flags)
+libgvfsdbus_la_SOURCES = $(vfssources)
+libgvfsdbus_la_LIBADD = $(vfslibs)
+
+## Uri parser modules
-libvfsomodule_flags = -export_dynamic -avoid-version -module -no-undefined
-libvfsmodules_LTLIBRARIES = libsmb.la
libvfsmodulesdir = $(libdir)/gvfs/modules
+libvfsmodules_LTLIBRARIES = libsmb.la
libsmb_la_LDFLAGS = $(module_flags)
libsmb_la_SOURCES = \
@@ -43,4 +52,37 @@ libsmb_la_SOURCES = \
libsmb_la_LIBADD = \
$(top_builddir)/gio/libgio.la \
$(top_builddir)/common/libgvfscommon.la \
- $(GLIB_LIBS)
+ $(GLIB_LIBS) \
+ $(NULL)
+
+
+if USE_FUSE
+
+## Static client lib for FUSE daemon
+
+noinst_LTLIBRARIES = libgvfsdbusfuse.la
+
+libgvfsdbusfuse_la_SOURCES = $(vfssources)
+libgvfsdbusfuse_la_LIBADD = $(vfslibs)
+
+## FUSE daemon
+
+libexec_PROGRAMS = gvfs-fuse-daemon
+
+gvfs_fuse_daemon_SOURCES = \
+ gvfsfusedaemon.c
+
+gvfs_fuse_daemon_INCLUDES = \
+ -I$(top_srcdir) \
+ -I$(top_srcdir)/common \
+ $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(FUSE_CFLAGS) \
+ -DG_LOG_DOMAIN=\"GVFS-FUSE\" -DG_DISABLE_DEPRECATED \
+ -DDBUS_API_SUBJECT_TO_CHANGE
+
+gvfs_fuse_daemon_LDADD = \
+ $(top_builddir)/gio/libgio.la \
+ $(top_builddir)/common/libcommon.la \
+ $(top_builddir)/client/libgvfsdbusfuse.la \
+ $(GLIB_LIBS) $(DBUS_LIBS) $(FUSE_LIBS)
+
+endif
diff --git a/fuse/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index c2cfa99a..2a3001ec 100644
--- a/fuse/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -15,7 +15,8 @@
#include <glib/gi18n.h>
#include <glib/gprintf.h>
-#include <gio/gvfs.h>
+#include "gdaemonvfs.h"
+#include "gdaemonfile.h"
#include <gmounttracker.h>
#define FUSE_USE_VERSION 26
@@ -277,12 +278,16 @@ escape_fs_name (const gchar *name)
return escape_to_uri_syntax (name, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-+@#$., ");
}
+#if 0
+
static gchar *
escape_uri_component (const gchar *uri_component)
{
return escape_to_uri_syntax (uri_component, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789/_-+., ");
}
+#endif
+
static MountRecord *
mount_record_find_by_mount_spec (GMountSpec *mount_spec)
{
@@ -344,6 +349,8 @@ mount_record_find_by_mount_name (const gchar *mount_name)
return mount_record;
}
+#if 0
+
static gchar *
mount_spec_to_uri (GMountSpec *mount_spec)
{
@@ -381,6 +388,8 @@ mount_spec_to_uri (GMountSpec *mount_spec)
return uri;
}
+#endif
+
static gboolean
path_to_mount_record_and_path (const gchar *full_path, MountRecord **mount_record, gchar **mount_path)
{
@@ -434,13 +443,16 @@ path_to_mount_record_and_path (const gchar *full_path, MountRecord **mount_recor
static GFile *
file_from_mount_record_and_path (MountRecord *mount_record, const gchar *path)
{
+#if 0
gchar *mount_uri;
gchar *base_uri;
gchar *escaped_path;
+#endif
GFile *file;
- /* Files in a directory */
+ file = g_daemon_file_new (mount_record->info->mount_spec, path);
+#if 0
mount_uri = mount_spec_to_uri (mount_record->info->mount_spec);
escaped_path = escape_uri_component (path);
base_uri = g_strconcat (mount_uri, escaped_path, NULL);
@@ -449,6 +461,7 @@ file_from_mount_record_and_path (MountRecord *mount_record, const gchar *path)
g_free (mount_uri);
g_free (escaped_path);
g_free (base_uri);
+#endif
g_assert (file != NULL);
@@ -995,7 +1008,7 @@ vfs_init (struct fuse_conn_info *conn)
mount_list_mutex = g_mutex_new ();
/* Initializes D-Bus and other VFS necessities */
- gvfs = g_vfs_get ();
+ gvfs = G_VFS (g_daemon_vfs_new ());
mount_tracker = g_mount_tracker_new ();
@@ -1009,10 +1022,9 @@ static void
vfs_destroy (gpointer param)
{
mount_list_free ();
-
g_main_loop_quit (subthread_main_loop);
-
g_mutex_free (mount_list_mutex);
+ g_object_unref (gvfs);
}
static struct fuse_operations vfs_oper =
diff --git a/configure.ac b/configure.ac
index 70f80687..928993c6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -349,7 +349,6 @@ if test "$GCC" = "yes" -a "$set_more_warnings" != "no"; then
-Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes \
-Wnested-externs -Wpointer-arith \
-Wcast-align -Wsign-compare \
- -Werror \
$CFLAGS"
for option in -Wno-strict-aliasing -Wno-sign-compare; do
@@ -380,7 +379,6 @@ gio/fam/Makefile
common/Makefile
client/Makefile
daemon/Makefile
-fuse/Makefile
programs/Makefile
po/Makefile.in
gio-standalone.pc
diff --git a/fuse/Makefile.am b/fuse/Makefile.am
deleted file mode 100644
index 4f44d44a..00000000
--- a/fuse/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-NULL =
-
-INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gvfs \
- -I$(top_srcdir)/common \
- $(GLIB_CFLAGS) $(DBUS_CFLAGS) $(FUSE_CFLAGS) \
- -DG_LOG_DOMAIN=\"GVFS-FUSE\" -DG_DISABLE_DEPRECATED \
- -DDBUS_API_SUBJECT_TO_CHANGE
-
-libraries = \
- $(top_builddir)/gio/libgio.la \
- $(top_builddir)/common/libcommon.la \
- $(GLIB_LIBS) $(DBUS_LIBS) $(FUSE_LIBS)
-
-libexec_PROGRAMS = gvfs-fuse-daemon
-
-gvfs_fuse_daemon_SOURCES = \
- gvfsfusedaemon.c
-
-gvfs_fuse_daemon_LDADD = $(libraries)