summaryrefslogtreecommitdiff
path: root/debian/patches/xattr0003-Small-fixes.patch
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-07-28 15:18:10 +0200
committerJustus Winter <justus@gnupg.org>2016-07-28 15:18:10 +0200
commitbe392f84799b9e0ba2a2bded5d350190994b5a87 (patch)
tree413a45ac82d8916df1669528676a27cc08e64fc7 /debian/patches/xattr0003-Small-fixes.patch
parent6bfe68531d81f5a1353b88586e6470ca36d0e724 (diff)
add patch seriesHEADmaster
Diffstat (limited to 'debian/patches/xattr0003-Small-fixes.patch')
-rw-r--r--debian/patches/xattr0003-Small-fixes.patch44
1 files changed, 44 insertions, 0 deletions
diff --git a/debian/patches/xattr0003-Small-fixes.patch b/debian/patches/xattr0003-Small-fixes.patch
new file mode 100644
index 00000000..77a5e433
--- /dev/null
+++ b/debian/patches/xattr0003-Small-fixes.patch
@@ -0,0 +1,44 @@
+From 19f7a0af88ebd92223c89c7134d5ba15b781c8d9 Mon Sep 17 00:00:00 2001
+From: Justus Winter <justus@gnupg.org>
+Date: Thu, 14 Jul 2016 23:53:28 +0200
+Subject: [PATCH hurd 3/6] Small fixes
+
+---
+ ext2fs/inode.c | 15 +++++++--------
+ 1 file changed, 7 insertions(+), 8 deletions(-)
+
+diff --git a/ext2fs/inode.c b/ext2fs/inode.c
+index 175bc26..fd28295 100644
+--- a/ext2fs/inode.c
++++ b/ext2fs/inode.c
+@@ -578,20 +578,19 @@ diskfs_set_translator (struct node *np, const char *name, unsigned namelen,
+ }
+
+ /* Use xattr to store translator record, with key "gnu.translator" */
+- err = ext2_get_xattr(np, "gnu.translator", NULL, &len);
+- if (err && err != ENODATA)
+- return err;
+-
+- if (namelen && err == ENODATA)
++ if (namelen)
+ {
+- err = ext2_set_xattr(np, "gnu.translator", name, namelen, XATTR_CREATE);
++ err = ext2_set_xattr (np, "gnu.translator", name, namelen, 0);
+
+ np->dn_stat.st_mode |= S_IPTRANS;
+ np->dn_set_ctime = 1;
+ }
+- else if (!namelen && !err)
++ else
+ {
+- err = ext2_set_xattr(np, "gnu.translator", NULL, 0, 0);
++ err = ext2_set_xattr (np, "gnu.translator", NULL, 0, 0);
++
++ np->dn_stat.st_mode &= ~S_IPTRANS;
++ np->dn_set_ctime = 1;
+ }
+
+ diskfs_end_catch_exception ();
+--
+2.8.1
+