From: chrubis@suse.cz
To: Helge Deller <deller@gmx.de>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] fix fanotify syscall (again)
Date: Tue, 15 Jul 2014 10:45:01 +0200 [thread overview]
Message-ID: <20140715084501.GA19089@rei> (raw)
In-Reply-To: <20140710161355.GA14288@ls3530.dhcp.wdf.sap.corp>
Hi!
> diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
> index a52093c..6625811 100644
> --- a/testcases/kernel/syscalls/fanotify/fanotify.h
> +++ b/testcases/kernel/syscalls/fanotify/fanotify.h
> @@ -28,27 +28,43 @@
> #ifndef __FANOTIFY_H__
> #define __FANOTIFY_H__
>
> +#include "config.h"
> +
> #include <stdint.h>
> -#include <endian.h>
> -#include "lapi/abisize.h"
> #include "linux_syscall_numbers.h"
>
> /* fanotify(7) wrappers */
>
> -#define myfanotify_init(flags, event_f_flags) \
> - syscall(__NR_fanotify_init, flags, event_f_flags)
>
> -long myfanotify_mark(int fd, unsigned int flags, uint64_t mask,
> +#if defined(HAVE_SYS_FANOTIFY_H)
> +
> +#include <sys/fanotify.h>
> +
> +static int myfanotify_init(unsigned int flags, unsigned int event_f_flags)
> +{
> + return fanotify_init(flags, event_f_flags);
> +}
> +static long myfanotify_mark(int fd, unsigned int flags, uint64_t mask,
> int dfd, const char *pathname)
> {
> -#if LTP_USE_64_ABI
> - return ltp_syscall(__NR_fanotify_mark, fd, flags, mask, dfd, pathname);
> -#else
> - return ltp_syscall(__NR_fanotify_mark, fd, flags,
> - __LONG_LONG_PAIR((unsigned long) (mask >> 32),
> - (unsigned long) mask),
> - dfd, (unsigned long) pathname);
> -#endif
> + return fanotify_mark(fd, flags, mask, dfd, pathname);
> +}
What about we drop the myfanotify*() functions now since we check if
fanotify.h exists now, use fanotify*() in the testcases and define the
syscall wrappers only when fanotify.h is not available (see for example
include/lapi/renameat.h)?
Otherwise it looks fine to me.
--
Cyril Hrubis
chrubis@suse.cz
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-07-15 8:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-10 16:13 [LTP] [PATCH] fix fanotify syscall (again) Helge Deller
2014-07-14 11:20 ` Jan Stancek
2014-07-14 13:45 ` chrubis
2014-07-15 8:45 ` chrubis [this message]
[not found] ` <53D7C780.3080906@gmx.de>
2014-08-06 11:51 ` chrubis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140715084501.GA19089@rei \
--to=chrubis@suse.cz \
--cc=deller@gmx.de \
--cc=ltp-list@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox