]> granicus.if.org Git - strace/commitdiff
Update MFD_* constants
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 13 Sep 2017 15:50:37 +0000 (15:50 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sun, 17 Sep 2017 12:04:11 +0000 (12:04 +0000)
* xlat/memfd_create_flags.in: Add MFD_HUGETLB introduced
by kernel commit v4.14-rc1~126^2~17.
* NEWS: Mention this.
* tests/memfd_create.c (main): Update expected output.

NEWS
tests/memfd_create.c
xlat/memfd_create_flags.in

diff --git a/NEWS b/NEWS
index 416bbc288cb741be20f77f6089f00cd3137bd63c..352b8e0327a17617c746e7cdc0c696875e573380 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2,8 +2,8 @@ Noteworthy changes in release ?.?? (????-??-??)
 ===============================================
 
 * Improvements
-  * Updated lists of ARPHRD_*, BPF_*, ETH_P_*, MADV_*, SO_*, SOL_* and TCP_*
-    constants.
+  * Updated lists of ARPHRD_*, BPF_*, ETH_P_*, MADV_*, MFD_*, SO_*, SOL_*,
+    and TCP_* constants.
 
 Noteworthy changes in release 4.19 (2017-09-05)
 ===============================================
index 480fd17713408686e729cb67e1ba30db03500b2f..4559b426d1011f7c614a0a9ced7f9dcd71be3904 100644 (file)
@@ -11,10 +11,11 @@ int
 main(void)
 {
        static const char text[] = "strace";
-       int rc = syscall(__NR_memfd_create, text, 7);
+       int rc = syscall(__NR_memfd_create, text, 0xf);
 
-       printf("memfd_create(\"%s\", %s) = %d %s (%m)\n",
-              text, "MFD_CLOEXEC|MFD_ALLOW_SEALING|0x4", rc, errno2name());
+       printf("memfd_create(\"%s\", %s) = %s\n",
+              text, "MFD_CLOEXEC|MFD_ALLOW_SEALING|MFD_HUGETLB|0x8",
+              sprintrc(rc));
 
        puts("+++ exited with 0 +++");
        return 0;
index 04a1b47af1e7fc3a5c9ae4f94c502ab7d98a0307..9dd625fb1fdc51bf8c3f14add49b3556a6622dff 100644 (file)
@@ -1,2 +1,3 @@
 MFD_CLOEXEC 1
 MFD_ALLOW_SEALING 2
+MFD_HUGETLB 4