diff options
| author | Alejandro Colomar <colomar.6.4.3@gmail.com> | 2020-09-12 01:14:07 +0200 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2020-09-13 08:07:05 +0200 |
| commit | f6fbffeae5277cd2a8ea038aacef4907c3f75b96 (patch) | |
| tree | a4f855cf74b2be70c456999a150354497bb70028 | |
| parent | adb20841091bc467a9560db90b36e4f61a43d6c5 (diff) | |
| download | man-pages-f6fbffeae5277cd2a8ea038aacef4907c3f75b96.tar.gz | |
userfaultfd.2: Use 'PRIx64' rather than "%llx" when printing 64-bit fixed-width types
Signed-off-by: Alejandro Colomar <colomar.6.4.3@gmail.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/userfaultfd.2 | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index 126d4a8547..c7e42804a4 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -566,6 +566,7 @@ Read address 0x7fd30106ec0f in main(): C Licensed under the GNU General Public License version 2 or later. */ #define _GNU_SOURCE +#include <inttypes.h> #include <sys/types.h> #include <stdio.h> #include <linux/userfaultfd.h> @@ -650,8 +651,8 @@ fault_handler_thread(void *arg) /* Display info about the page\-fault event */ printf(" UFFD_EVENT_PAGEFAULT event: "); - printf("flags = %llx; ", msg.arg.pagefault.flags); - printf("address = %llx\en", msg.arg.pagefault.address); + printf("flags = %"PRIx64"; ", msg.arg.pagefault.flags); + printf("address = %"PRIx64"\en", msg.arg.pagefault.address); /* Copy the page pointed to by \(aqpage\(aq into the faulting region. Vary the contents that are copied in, so that it @@ -673,7 +674,7 @@ fault_handler_thread(void *arg) if (ioctl(uffd, UFFDIO_COPY, &uffdio_copy) == \-1) errExit("ioctl\-UFFDIO_COPY"); - printf(" (uffdio_copy.copy returned %lld)\en", + printf(" (uffdio_copy.copy returned %"PRId64")\en", uffdio_copy.copy); } } |
