[oe-commits] [meta-openembedded] 19/22: libhugetlbfs: Fix missing file mode in create() API

git at git.openembedded.org git at git.openembedded.org
Thu Jan 16 04:54:50 UTC 2020


This is an automated email from the git hooks/post-receive script.

khem pushed a commit to branch master-next
in repository meta-openembedded.

commit 182a1f60df745eb3d0f054e5829fd20f819e4838
Author: Khem Raj <raj.khem at gmail.com>
AuthorDate: Wed Jan 15 20:28:13 2020 -0800

    libhugetlbfs: Fix missing file mode in create() API
    
    Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
 ...sts-add-explicit-permissions-to-open-call.patch | 41 ++++++++++++++++++++++
 .../libhugetlbfs/libhugetlbfs_git.bb               |  1 +
 2 files changed, 42 insertions(+)

diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch
new file mode 100644
index 0000000..9d52b90
--- /dev/null
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/files/0001-tests-add-explicit-permissions-to-open-call.patch
@@ -0,0 +1,41 @@
+From d07d2f9601b49bb72cd4b36838f0c238bd1b0fc1 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem at gmail.com>
+Date: Wed, 15 Jan 2020 18:45:09 -0800
+Subject: [PATCH] tests: add explicit permissions to open() call
+
+Fixes
+gethugepagesizes.c:227:35: error: open with O_CREAT in second argument needs 3 arguments
+|         fd = open(fname, O_WRONLY|O_CREAT);
+|                                          ^
+
+Upstream-Status: Submitted [https://groups.google.com/forum/#!topic/libhugetlbfs/anNtDXbQKro]
+Signed-off-by: Khem Raj <raj.khem at gmail.com>
+---
+ tests/gethugepagesizes.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/tests/gethugepagesizes.c b/tests/gethugepagesizes.c
+index 9551b38..5777265 100644
+--- a/tests/gethugepagesizes.c
++++ b/tests/gethugepagesizes.c
+@@ -223,7 +223,7 @@ void setup_fake_data(long sizes[], int n_elem)
+ 		FAIL("mkdtemp: %s", strerror(errno));
+ 
+ 	sprintf(fname, "%s/meminfo-none", fake_meminfo);
+-	fd = open(fname, O_WRONLY|O_CREAT);
++	fd = open(fname, O_WRONLY|O_CREAT, 0600);
+ 	if (fd < 0)
+ 		FAIL("open: %s", strerror(errno));
+ 	if (write(fd, meminfo_base,
+@@ -233,7 +233,7 @@ void setup_fake_data(long sizes[], int n_elem)
+ 		FAIL("close: %s", strerror(errno));
+ 
+ 	sprintf(fname, "%s/meminfo-hugepages", fake_meminfo);
+-	fd = open(fname, O_WRONLY|O_CREAT);
++	fd = open(fname, O_WRONLY|O_CREAT, 0600);
+ 	if (fd < 0)
+ 		FAIL("open: %s", strerror(errno));
+ 	if (write(fd, meminfo_base,
+-- 
+2.25.0
+
diff --git a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
index f258122..e66db1a 100644
--- a/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
+++ b/meta-oe/recipes-benchmark/libhugetlbfs/libhugetlbfs_git.bb
@@ -24,6 +24,7 @@ SRC_URI = " \
     file://0004-shm.c-Mark-glibc-specific-changes-so.patch \
     file://0005-Include-dirent.h-for-ino_t.patch \
     file://0006-include-limits.h-for-PATH_MAX.patch \
+    file://0001-tests-add-explicit-permissions-to-open-call.patch \
 "
 
 UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>\d+(\.\d+)+)"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list