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>
/* 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
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);
}
}