On Thu, Apr 21, 2016 at 06:27:13PM +0200, Gabriel Laskar wrote: > On Thu, 21 Apr 2016 14:04:33 +0100 > "Dr. David Alan Gilbert" <dgilb...@redhat.com> wrote: > > > Hi, > > Please find below a decoder for the UFFDIO_COPY ioctl > > on the userfaultfd fd; but there are a few other ioctls > > in the set to decode and I thought I'd ask before doing those: > > > > 1) Is it basically on the right lines; I'm not that confident > > I understand the return flags on the ioctl decoder function. > > The return flags are the same as for the syscalls in general, it is > written in defs.h around line 378. It allows to type the return value > if it is not an int. > > For the ioctl decoding function, on entering there is: > > * 0 if nothing has been decoded, (and it will be probably done on > exiting()) > * 1 parameter have been parsed, and printed > * RVAL_DECODED if there is nothing else to do. > * 1 | RVAL_DECODED : parameter have been parsed, but there is some kind > of error/nothing has been printed, so this allow the ioctl decoder to > write a default value. > > and on exiting, there is only 0 or 1.
You can find the result of my attempt to explain this semantics in the mailing list archive, e.g. at https://sourceforge.net/p/strace/mailman/message/34451172/ -- ldv
pgpDGDwgP9pPh.pgp
Description: PGP signature
------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! https://ad.doubleclick.net/ddm/clk/302982198;130105516;z
_______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel