summaryrefslogtreecommitdiff
path: root/import-layers/yocto-poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch
diff options
context:
space:
mode:
authorBrad Bishop <bradleyb@fuzziesquirrel.com>2018-02-26 06:55:05 +0300
committerBrad Bishop <bradleyb@fuzziesquirrel.com>2018-03-15 17:22:49 +0300
commitd7bf8c17eca8f8c89898a7794462c773c449e983 (patch)
treed18618fca85ca5f0c077032cc7b009344b60f663 /import-layers/yocto-poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch
parente2b5abdc9f28cdf8578e5b9be803c8e697443c20 (diff)
downloadopenbmc-d7bf8c17eca8f8c89898a7794462c773c449e983.tar.xz
Yocto 2.4
Move OpenBMC to Yocto 2.4(rocko) Tested: Built and verified Witherspoon and Palmetto images Change-Id: I12057b18610d6fb0e6903c60213690301e9b0c67 Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch')
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch57
1 files changed, 29 insertions, 28 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch b/import-layers/yocto-poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch
index 6944bb7aa0..5610ed9beb 100644
--- a/import-layers/yocto-poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch
+++ b/import-layers/yocto-poky/meta/recipes-extended/acpica/files/manipulate-fds-instead-of-FILE.patch
@@ -1,6 +1,6 @@
-From 33a57979738e5ab13950ec1c0e7298e41ef50929 Mon Sep 17 00:00:00 2001
-From: Patrick Ohly <patrick.ohly@intel.com>
-Date: Thu, 23 Feb 2017 18:10:47 +0100
+From 69171c22f3872ecb4c1ab27985e93ca44084595e Mon Sep 17 00:00:00 2001
+From: Fan Xin <fan.xin@jp.fujitsu.com>
+Date: Mon, 5 Jun 2017 13:26:38 +0900
Subject: [PATCH] aslfiles.c: manipulate fds instead of FILE
Copying what stdout/stderr point to is not portable and fails with
@@ -12,60 +12,61 @@ writes into. This works on the platforms that Yocto targets.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
+
+Rebase on acpica 20170303
+
+Signed-off-by: Fan Xin <fan.xin@jp.fujitsu.com>
---
- source/compiler/aslfiles.c | 20 +++++++++++---------
- 1 file changed, 11 insertions(+), 9 deletions(-)
+ acpica-unix2-20170303/source/compiler/aslfiles.c | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
-diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c
-index 947e465..7a352b4 100644
---- a/source/compiler/aslfiles.c
-+++ b/source/compiler/aslfiles.c
-@@ -44,6 +44,11 @@
+diff --git a/acpica-unix2-20170303/source/compiler/aslfiles.c b/acpica-unix2-20170303/source/compiler/aslfiles.c
+index 809090c..97898b1 100644
+--- a/acpica-unix2-20170303/source/compiler/aslfiles.c
++++ b/acpica-unix2-20170303/source/compiler/aslfiles.c
+@@ -44,6 +44,10 @@
#include "aslcompiler.h"
#include "acapps.h"
-
+ #include "dtcompiler.h"
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
-+
+
#define _COMPONENT ACPI_COMPILER
ACPI_MODULE_NAME ("aslfiles")
-
-@@ -569,6 +574,8 @@ FlOpenMiscOutputFiles (
+@@ -607,6 +611,8 @@ FlOpenMiscOutputFiles (
if (Gbl_DebugFlag)
{
-+ int fd;
++ int fd;
+
Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_DEBUG);
if (!Filename)
{
-@@ -582,20 +589,15 @@ FlOpenMiscOutputFiles (
- /* TBD: hide this behind a FlReopenFile function */
+@@ -618,10 +624,10 @@ FlOpenMiscOutputFiles (
+ /* Open the debug file as STDERR, text mode */
Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Filename = Filename;
- Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle =
- freopen (Filename, "w+t", stderr);
--
+
- if (!Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle)
+ fd = open(Filename, O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH);
+ if (fd < 0 ||
+ dup2(fd, fileno(stderr)))
{
-- /*
-- * A problem with freopen is that on error,
-- * we no longer have stderr.
-- */
- Gbl_DebugFlag = FALSE;
-- memcpy (stderr, stdout, sizeof (FILE));
- FlFileError (ASL_FILE_DEBUG_OUTPUT, ASL_MSG_DEBUG_FILENAME);
- AslAbort ();
+ /*
+ * A problem with freopen is that on error, we no longer
+@@ -635,6 +641,8 @@ FlOpenMiscOutputFiles (
+ exit (1);
}
-+ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = stderr;
++ Gbl_Files[ASL_FILE_DEBUG_OUTPUT].Handle = stderr;
++
AslCompilerSignon (ASL_FILE_DEBUG_OUTPUT);
AslCompilerFileHeader (ASL_FILE_DEBUG_OUTPUT);
+ }
--
-2.1.4
+1.9.1