summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch')
-rw-r--r--meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch53
1 files changed, 0 insertions, 53 deletions
diff --git a/meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch b/meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch
deleted file mode 100644
index dd6fd87ae9..0000000000
--- a/meta/recipes-devtools/pseudo/files/0002-Use-correct-file-descriptor.patch
+++ /dev/null
@@ -1,53 +0,0 @@
1From 7a0632cad851826d804db0540d9a59773e6bf29c Mon Sep 17 00:00:00 2001
2From: Seebs <seebs@seebs.net>
3Date: Wed, 28 Sep 2016 22:12:29 -0500
4Subject: [PATCH 2/2] Use correct file descriptor
5
6So it turns out that pseudo_logfile() was returning 0 or -1, and
7pseudo_debug_logfile() was expecting it to be the correct file descriptor
8to use. And it's basically a mystery that any of that ever worked.
9
10Signed-off-by: Seebs <seebs@seebs.net>
11
12Upstream-Status: Backport
13Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
14---
15 ChangeLog.txt | 3 +++
16 pseudo_util.c | 3 ++-
17 2 files changed, 5 insertions(+), 1 deletion(-)
18
19diff --git a/ChangeLog.txt b/ChangeLog.txt
20index 4cc24de..49a6c36 100644
21--- a/ChangeLog.txt
22+++ b/ChangeLog.txt
23@@ -2,6 +2,9 @@
24 * (seebs) Send errors to log when daemonizing, but do that a lot
25 sooner to prevent startup messages which can show up spuriously
26 with multiple clients.
27+ * (seebs) return file descriptor from pseudo_logfile, so we set
28+ pseudo_util_debug_fd to the right value instead of to stdin.
29+ Nice bug.
30
31 2016-07-28:
32 * (seebs) Fix performance issue on deletion with xattr changes.
33diff --git a/pseudo_util.c b/pseudo_util.c
34index 0c156cf..a60c74b 100644
35--- a/pseudo_util.c
36+++ b/pseudo_util.c
37@@ -1569,7 +1569,7 @@ pseudo_logfile(char *filename, char *defname, int prefer_fd) {
38 if (fd == -1)
39 return -1;
40 else
41- return 0;
42+ return fd;
43 }
44
45 int
46@@ -1579,6 +1579,7 @@ pseudo_debug_logfile(char *defname, int prefer_fd) {
47
48 fd = pseudo_logfile(filename, defname, prefer_fd);
49 if (fd > -1) {
50+ pseudo_diag("debug_logfile: fd %d\n", fd);
51 pseudo_util_debug_fd = fd;
52 return 0;
53 }