userfaultfd: enhance decoding of struct uffdio_api.features
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 19 Jul 2017 00:33:56 +0000 (00:33 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 19 Jul 2017 00:33:56 +0000 (00:33 +0000)
commit16eded4c4b53d9ac4fa90860f05abeb96855185a
tree041828dc9a97a72e7fa2987cead62d40719192c6
parent88af5e4cf513fb85e8c5193c13e7062f290babbf
userfaultfd: enhance decoding of struct uffdio_api.features

As struct uffdio_api.features has read-write semantics,
print the value returned by the kernel only when it differs
from the value passed to the kernel.

* userfaultfd.c (uffdio_ioctl) <UFFDIO_API>: On entering syscall,
save the value of struct uffdio_api.features.  On exiting syscall, do
not print struct uffdio_api.features when it's the same as on entering.
* tests/ioctl_uffdio.c (main): Update expected output.
tests/ioctl_uffdio.c
userfaultfd.c