Update to 1.9.2
Enable real statfs calls in the fuse daemon
This commit is contained in:
parent
b94885209b
commit
535a3425bb
1
.gitignore
vendored
1
.gitignore
vendored
@ -9,3 +9,4 @@ gvfs-1.6.3.tar.bz2
|
|||||||
/gvfs-1.8.1.tar.bz2
|
/gvfs-1.8.1.tar.bz2
|
||||||
/gvfs-1.9.0.tar.bz2
|
/gvfs-1.9.0.tar.bz2
|
||||||
/gvfs-1.9.1.tar.xz
|
/gvfs-1.9.1.tar.xz
|
||||||
|
/gvfs-1.9.2.tar.xz
|
||||||
|
116
gvfs-1.9.2-fuse-statfs.patch
Normal file
116
gvfs-1.9.2-fuse-statfs.patch
Normal file
@ -0,0 +1,116 @@
|
|||||||
|
From 41eaac3a128459b41a13bc2b7da0d48b275f954b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tomas Bzatek <tbzatek@redhat.com>
|
||||||
|
Date: Wed, 27 Jul 2011 12:15:04 +0200
|
||||||
|
Subject: [PATCH] fuse: Bring back real statfs()
|
||||||
|
|
||||||
|
https://bugzilla.gnome.org/show_bug.cgi?id=655401
|
||||||
|
---
|
||||||
|
client/gvfsfusedaemon.c | 67 ++++++++++++----------------------------------
|
||||||
|
1 files changed, 18 insertions(+), 49 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
|
||||||
|
index 4a772fa..b41e83b 100644
|
||||||
|
--- a/client/gvfsfusedaemon.c
|
||||||
|
+++ b/client/gvfsfusedaemon.c
|
||||||
|
@@ -634,12 +634,6 @@ file_from_full_path (const gchar *path)
|
||||||
|
* VFS functions *
|
||||||
|
* ------------- */
|
||||||
|
|
||||||
|
-#if 0
|
||||||
|
-
|
||||||
|
-/* A stat -f <path> on a FUSE mount always results in this function being called with a path
|
||||||
|
- * of '/'. This means we can't return valid info for the various mounts. Hopefully we can
|
||||||
|
- * fix this in the future. */
|
||||||
|
-
|
||||||
|
static gint
|
||||||
|
vfs_statfs (const gchar *path, struct statvfs *stbuf)
|
||||||
|
{
|
||||||
|
@@ -649,32 +643,35 @@ vfs_statfs (const gchar *path, struct statvfs *stbuf)
|
||||||
|
|
||||||
|
debug_print ("vfs_statfs: %s\n", path);
|
||||||
|
|
||||||
|
+ memset (stbuf, 0, sizeof (*stbuf));
|
||||||
|
+
|
||||||
|
+ /* Fallback case */
|
||||||
|
+ stbuf->f_bsize = 4096;
|
||||||
|
+ stbuf->f_frsize = 4096; /* Ignored by FUSE */
|
||||||
|
+ stbuf->f_blocks = 0;
|
||||||
|
+ stbuf->f_bfree = 0;
|
||||||
|
+ stbuf->f_bavail = 0;
|
||||||
|
+ stbuf->f_files = 0;
|
||||||
|
+ stbuf->f_ffree = 0;
|
||||||
|
+ stbuf->f_favail = 0; /* Ignored by FUSE */
|
||||||
|
+ stbuf->f_fsid = 1; /* Ignored by FUSE */
|
||||||
|
+ stbuf->f_flag = 0; /* Ignored by FUSE */
|
||||||
|
+ stbuf->f_namemax = 1024;
|
||||||
|
+
|
||||||
|
if ((file = file_from_full_path (path)))
|
||||||
|
{
|
||||||
|
GFileInfo *file_info;
|
||||||
|
|
||||||
|
- file_info = g_file_get_filesystem_info (file, "*", NULL, &error);
|
||||||
|
+ file_info = g_file_query_filesystem_info (file, "filesystem::*", NULL, &error);
|
||||||
|
|
||||||
|
if (file_info)
|
||||||
|
{
|
||||||
|
- memset (stbuf, 0, sizeof (*stbuf));
|
||||||
|
-
|
||||||
|
- stbuf->f_bsize = 4096;
|
||||||
|
- stbuf->f_frsize = 4096; /* Ignored by FUSE */
|
||||||
|
- stbuf->f_blocks = 0;
|
||||||
|
- stbuf->f_bfree = 0;
|
||||||
|
- stbuf->f_bavail = 0;
|
||||||
|
- stbuf->f_files = 0;
|
||||||
|
- stbuf->f_ffree = 0;
|
||||||
|
- stbuf->f_favail = 0; /* Ignored by FUSE */
|
||||||
|
- stbuf->f_fsid = 1; /* Ignored by FUSE */
|
||||||
|
- stbuf->f_flag = 0; /* Ignored by FUSE */
|
||||||
|
- stbuf->f_namemax = 1024;
|
||||||
|
-
|
||||||
|
if (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE))
|
||||||
|
stbuf->f_blocks = g_file_info_get_attribute_uint64 (file_info, G_FILE_ATTRIBUTE_FILESYSTEM_SIZE) / 4096;
|
||||||
|
if (g_file_info_has_attribute (file_info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE))
|
||||||
|
stbuf->f_bfree = stbuf->f_bavail = g_file_info_get_attribute_uint64 (file_info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE) / 4096;
|
||||||
|
+
|
||||||
|
+ g_object_unref (file_info);
|
||||||
|
}
|
||||||
|
else if (error)
|
||||||
|
{
|
||||||
|
@@ -694,34 +691,6 @@ vfs_statfs (const gchar *path, struct statvfs *stbuf)
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
-static gint
|
||||||
|
-vfs_statfs (const gchar *path, struct statvfs *stbuf)
|
||||||
|
-{
|
||||||
|
- gint result = 0;
|
||||||
|
-
|
||||||
|
- debug_print ("vfs_statfs: %s\n", path);
|
||||||
|
-
|
||||||
|
- memset (stbuf, 0, sizeof (*stbuf));
|
||||||
|
-
|
||||||
|
- stbuf->f_bsize = 4096;
|
||||||
|
- stbuf->f_frsize = 4096; /* Ignored by FUSE */
|
||||||
|
- stbuf->f_blocks = 0;
|
||||||
|
- stbuf->f_bfree = 0;
|
||||||
|
- stbuf->f_bavail = 0;
|
||||||
|
- stbuf->f_files = 0;
|
||||||
|
- stbuf->f_ffree = 0;
|
||||||
|
- stbuf->f_favail = 0; /* Ignored by FUSE */
|
||||||
|
- stbuf->f_fsid = 1; /* Ignored by FUSE */
|
||||||
|
- stbuf->f_flag = 0; /* Ignored by FUSE */
|
||||||
|
- stbuf->f_namemax = 1024;
|
||||||
|
-
|
||||||
|
- debug_print ("vfs_statfs: -> %s\n", g_strerror (-result));
|
||||||
|
-
|
||||||
|
- return result;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static mode_t
|
||||||
|
file_info_get_stat_mode (GFileInfo *file_info)
|
||||||
|
{
|
||||||
|
--
|
||||||
|
1.7.6
|
||||||
|
|
11
gvfs.spec
11
gvfs.spec
@ -1,6 +1,6 @@
|
|||||||
Summary: Backends for the gio framework in GLib
|
Summary: Backends for the gio framework in GLib
|
||||||
Name: gvfs
|
Name: gvfs
|
||||||
Version: 1.9.1
|
Version: 1.9.2
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: LGPLv2+
|
License: LGPLv2+
|
||||||
Group: System Environment/Libraries
|
Group: System Environment/Libraries
|
||||||
@ -34,6 +34,8 @@ BuildRequires: libtool
|
|||||||
|
|
||||||
# http://bugzilla.gnome.org/show_bug.cgi?id=567235
|
# http://bugzilla.gnome.org/show_bug.cgi?id=567235
|
||||||
Patch0: gvfs-archive-integration.patch
|
Patch0: gvfs-archive-integration.patch
|
||||||
|
# https://bugzilla.gnome.org/show_bug.cgi?id=655401
|
||||||
|
Patch1: gvfs-1.9.2-fuse-statfs.patch
|
||||||
|
|
||||||
Obsoletes: gnome-mount <= 0.8
|
Obsoletes: gnome-mount <= 0.8
|
||||||
Obsoletes: gnome-mount-nautilus-properties <= 0.8
|
Obsoletes: gnome-mount-nautilus-properties <= 0.8
|
||||||
@ -131,6 +133,7 @@ including phones and music players to applications using gvfs.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .archive-integration
|
%patch0 -p1 -b .archive-integration
|
||||||
|
%patch1 -p1 -b .fuse-statfs
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
@ -277,7 +280,7 @@ killall -USR1 gvfsd >&/dev/null || :
|
|||||||
|
|
||||||
%files archive
|
%files archive
|
||||||
%defattr(-, root, root, -)
|
%defattr(-, root, root, -)
|
||||||
%dir %{_datadir}/applications/mount-archive.desktop
|
%{_datadir}/applications/mount-archive.desktop
|
||||||
%{_libexecdir}/gvfsd-archive
|
%{_libexecdir}/gvfsd-archive
|
||||||
%{_datadir}/gvfs/mounts/archive.mount
|
%{_datadir}/gvfs/mounts/archive.mount
|
||||||
|
|
||||||
@ -307,6 +310,10 @@ killall -USR1 gvfsd >&/dev/null || :
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jul 27 2011 Tomas Bzatek <tbzatek@redhat.com> - 1.9.2-1
|
||||||
|
- Update to 1.9.2
|
||||||
|
- Enable real statfs calls in the fuse daemon
|
||||||
|
|
||||||
* Wed Jun 15 2011 Tomas Bzatek <tbzatek@redhat.com> - 1.9.1-1
|
* Wed Jun 15 2011 Tomas Bzatek <tbzatek@redhat.com> - 1.9.1-1
|
||||||
- Update to 1.9.1
|
- Update to 1.9.1
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user