From 00f4853c439a4393166f6a69f0428d9fdd418080 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Fri, 27 Jan 2017 08:33:26 +1300 Subject: [PATCH] userfaultfd.2: wsfix Signed-off-by: Michael Kerrisk --- man2/userfaultfd.2 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/man2/userfaultfd.2 b/man2/userfaultfd.2 index 52230af6a..9acd7f2ea 100644 --- a/man2/userfaultfd.2 +++ b/man2/userfaultfd.2 @@ -145,7 +145,7 @@ struct uffd_msg { __u8 event; /* Type of event */ ... union { - struct { + struct { __u64 flags; /* Flags describing fault */ __u64 address; /* Faulting address */ } pagefault; @@ -278,7 +278,7 @@ and registers the address range of that mapping using the .B UFFDIO_REGISTER .BR ioctl (2) operation. -The program then creates a second thread that will perform the +The program then creates a second thread that will perform the task of handling page faults. The main thread then walks through the pages of the mapping fetching @@ -298,7 +298,7 @@ All such events should be events, which the thread handles by copying a page of data into the faulting region using the -.B UFFDIO_COPY +.B UFFDIO_COPY .BR ioctl (2) operation. @@ -341,7 +341,7 @@ Read address 0x7fd30106ec0f in main(): C \& .nf /* userfaultfd_demo.c - + Licensed under the GNU General Public License version 2 or later. */ #define _GNU_SOURCE @@ -414,11 +414,11 @@ fault_handler_thread(void *arg) if (nread == 0) { printf("EOF on userfaultfd!\\n"); exit(EXIT_FAILURE); - } + } if (nread == \-1) errExit("read"); - + /* We expect only one kind of event; verify that assumption */ if (msg.event != UFFD_EVENT_PAGEFAULT) {