summaryrefslogtreecommitdiff
path: root/sysutils/fusefs-unionfs/files/patch-src__unionfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/fusefs-unionfs/files/patch-src__unionfs.c')
-rw-r--r--sysutils/fusefs-unionfs/files/patch-src__unionfs.c61
1 files changed, 36 insertions, 25 deletions
diff --git a/sysutils/fusefs-unionfs/files/patch-src__unionfs.c b/sysutils/fusefs-unionfs/files/patch-src__unionfs.c
index 859351cb25c7..6b9fcbd1afee 100644
--- a/sysutils/fusefs-unionfs/files/patch-src__unionfs.c
+++ b/sysutils/fusefs-unionfs/files/patch-src__unionfs.c
@@ -1,9 +1,24 @@
---- ./src/unionfs.c.orig 2012-09-11 00:06:32.000000000 +0200
-+++ ./src/unionfs.c 2013-07-24 16:54:01.555073796 +0200
-@@ -83,7 +83,11 @@
+--- src/unionfs.c.orig 2015-01-14 10:08:20 UTC
++++ src/unionfs.c
+@@ -65,6 +65,13 @@
+ #include "conf.h"
+ #include "uioctl.h"
+
++// Patch pushed upstream:
++// https://github.com/rpodgorny/unionfs-fuse/pull/40
++// Remove this as soon as pushed into a release.
++#ifdef IOCPARM_LEN
++#define _IOC_SIZE(nr) IOCPARM_LEN(nr)
++#endif
++
+ static struct fuse_opt unionfs_opts[] = {
+ FUSE_OPT_KEY("chroot=%s,", KEY_CHROOT),
+ FUSE_OPT_KEY("cow", KEY_COW),
+@@ -92,7 +99,12 @@ static int unionfs_chmod(const char *pat
char p[PATHLEN_MAX];
if (BUILD_PATH(p, uopt.branches[i].path, path)) RETURN(-ENAMETOOLONG);
++// Unsure of origin. Patch needs review.
+#if __FreeBSD__
+ int res = lchmod(p, mode);
+#else
@@ -12,29 +27,25 @@
if (res == -1) RETURN(-errno);
RETURN(0);
-@@ -190,7 +194,7 @@
- DBG("%s\n", path);
+@@ -671,6 +683,9 @@ static int unionfs_truncate(const char *
+ RETURN(0);
+ }
- if (uopt.stats_enabled && strcmp(path, STATS_FILENAME) == 0) {
-- memset(stbuf, 0, sizeof(stbuf));
-+ memset(stbuf, 0, sizeof(*stbuf));
- stbuf->st_mode = S_IFREG | 0444;
- stbuf->st_nlink = 1;
- stbuf->st_size = STATS_SIZE;
-@@ -663,7 +667,16 @@
- char p[PATHLEN_MAX];
- if (BUILD_PATH(p, uopt.branches[i].path, path)) RETURN(-ENAMETOOLONG);
++// Patch pushed upstream:
++// https://github.com/rpodgorny/unionfs-fuse/pull/39
++// Remove this as soon as pushed into a release.
+ static int unionfs_utimens(const char *path, const struct timespec ts[2]) {
+ DBG("%s\n", path);
-+#ifdef __FreeBSD__
-+ struct timeval tv[2];
-+ tv[0].tv_sec = ts[0].tv_sec;
+@@ -685,9 +700,9 @@ static int unionfs_utimens(const char *p
+ #else
+ struct timeval tv[2];
+ tv[0].tv_sec = ts[0].tv_sec;
+- tv[0].tv_usec = ts[0].tv_nsec * 1000;
+ tv[0].tv_usec = ts[0].tv_nsec / 1000;
-+ tv[1].tv_sec = ts[0].tv_sec;
-+ tv[1].tv_usec = ts[0].tv_nsec / 1000;
-+ int res = lutimes(p, tv);
-+#else
- int res = utimensat(0, p, ts, AT_SYMLINK_NOFOLLOW);
-+#endif
-
- if (res == -1) RETURN(-errno);
+ tv[1].tv_sec = ts[1].tv_sec;
+- tv[1].tv_usec = ts[1].tv_nsec * 1000;
++ tv[1].tv_usec = ts[1].tv_nsec / 1000;
+ int res = utimes(p, tv);
+ #endif