summary refs log tree commit diff
path: root/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2015-05-05 11:49:03 +0200
committerVladimír Čunát <vcunat@gmail.com>2015-05-05 11:49:03 +0200
commit375bc8def7c17506bc10f3b6193635f05d5ccc40 (patch)
tree6af7662b245e7998bd18ae20d9e74922c489fb6d /pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch
parent2f75c6845981b38a698cf1a9f620145877c80956 (diff)
parent7f9ccc628403ed88844a4436da3b2944be5560a4 (diff)
downloadnixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.gz
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.bz2
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.lz
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.xz
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.tar.zst
nixpkgs-375bc8def7c17506bc10f3b6193635f05d5ccc40.zip
Merge staging into closure-size
Diffstat (limited to 'pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch')
-rw-r--r--pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch39
1 files changed, 39 insertions, 0 deletions
diff --git a/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch b/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch
new file mode 100644
index 00000000000..9b3094e6005
--- /dev/null
+++ b/pkgs/tools/filesystems/mp3fs/fix-statfs-operation.patch
@@ -0,0 +1,39 @@
+From fea072084ff9d7c4d2c688059a2462bb0e59a2ec Mon Sep 17 00:00:00 2001
+From: K Henriksson <kthenriksson@gmail.com>
+Date: Wed, 27 Aug 2014 21:55:18 -0700
+Subject: [PATCH] Fix statfs operation
+
+The statfs implementation does not properly translate names back to the
+original, since the major encoding rewrite. This corrects that, and
+should fix issue #27.
+---
+ src/fuseops.c | 15 +++++++++++++--
+ 1 file changed, 13 insertions(+), 2 deletions(-)
+
+diff --git a/src/fuseops.c b/src/fuseops.c
+index e7b4e7e..c333cbd 100644
+--- a/src/fuseops.c
++++ b/src/fuseops.c
+@@ -337,9 +337,20 @@ static int mp3fs_statfs(const char *path, struct statvfs *stbuf) {
+     if (!origpath) {
+         goto translate_fail;
+     }
+-    
++
++    /* pass-through for regular files */
++    if (statvfs(origpath, stbuf) == 0) {
++        goto passthrough;
++    } else {
++        /* Not really an error. */
++        errno = 0;
++    }
++
++    find_original(origpath);
++
+     statvfs(origpath, stbuf);
+-    
++
++passthrough:
+     free(origpath);
+ translate_fail:
+     return -errno;