Message ID | 20200226061550.2561231-1-raj.khem@gmail.com |
---|---|
State | New |
Headers | show |
Series | tests: add explicit permissions to open() call | expand |
On Tue, 25 Feb 2020, Khem Raj wrote: > Fixes > gethugepagesizes.c:227:35: error: open with O_CREAT in second argument needs 3 arguments > | fd = open(fname, O_WRONLY|O_CREAT); > | ^ > > Signed-off-by: Khem Raj <raj.khem@gmail.com> Applied, Thanks Eric -- You received this message because you are subscribed to the Google Groups "libhugetlbfs" group. To unsubscribe from this group and stop receiving emails from it, send an email to libhugetlbfs+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/libhugetlbfs/20200226143710.GG7610%40munsonfam.org.
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,
Fixes gethugepagesizes.c:227:35: error: open with O_CREAT in second argument needs 3 arguments | fd = open(fname, O_WRONLY|O_CREAT); | ^ Signed-off-by: Khem Raj <raj.khem@gmail.com> --- tests/gethugepagesizes.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- You received this message because you are subscribed to the Google Groups "libhugetlbfs" group. To unsubscribe from this group and stop receiving emails from it, send an email to libhugetlbfs+unsubscribe@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/libhugetlbfs/20200226061550.2561231-1-raj.khem%40gmail.com.