public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <petr.vorel@gmail.com>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH v2 1/3] fanotify: Move __kernel_fsid_t definition to correct place
Date: Wed, 13 Nov 2019 01:56:24 +0100	[thread overview]
Message-ID: <20191113005626.19585-2-petr.vorel@gmail.com> (raw)
In-Reply-To: <20191113005626.19585-1-petr.vorel@gmail.com>

This fixes errors:

fanotify.h:149:55: error: unknown type name ?__kernel_fsid_t?
 static inline void fanotify_get_fid(const char *path, __kernel_fsid_t *fsid,
                                                       ^~~~~~~~~~~~~~~
fanotify13.c:47:2: error: unknown type name ?__kernel_fsid_t?
  __kernel_fsid_t fsid;

Remove #ifdef HAVE_NAME_TO_HANDLE_AT wrap of __kernel_fsid_t fallback
definition to simplify preprocessor checks.

Fixes: b8aebc835 ("fanotify: Fix missing __kernel_fsid_t definition")

Signed-off-by: Petr Vorel <petr.vorel@gmail.com>
---
 testcases/kernel/syscalls/fanotify/fanotify.h | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/testcases/kernel/syscalls/fanotify/fanotify.h b/testcases/kernel/syscalls/fanotify/fanotify.h
index 435f100d8..573ed5f59 100644
--- a/testcases/kernel/syscalls/fanotify/fanotify.h
+++ b/testcases/kernel/syscalls/fanotify/fanotify.h
@@ -116,6 +116,13 @@ struct fanotify_mark_type {
 	const char * name;
 };
 
+#ifndef __kernel_fsid_t
+typedef struct {
+	int	val[2];
+} lapi_fsid_t;
+#define __kernel_fsid_t lapi_fsid_t
+#endif /* __kernel_fsid_t */
+
 #ifndef FAN_REPORT_FID
 #define FAN_REPORT_FID		0x00000200
 
@@ -126,20 +133,13 @@ struct fanotify_event_info_header {
 };
 
 #ifdef HAVE_NAME_TO_HANDLE_AT
-#ifndef __kernel_fsid_t
-typedef struct {
-	int	val[2];
-} lapi_fsid_t;
-#define __kernel_fsid_t lapi_fsid_t
-#endif
-
 struct fanotify_event_info_fid {
 	struct fanotify_event_info_header hdr;
 	__kernel_fsid_t fsid;
 	unsigned char handle[0];
 };
-#endif
-#endif
+#endif /* HAVE_NAME_TO_HANDLE_AT */
+#endif /* ! FAN_REPORT_FID */
 
 #ifdef HAVE_NAME_TO_HANDLE_AT
 /*
-- 
2.24.0


  reply	other threads:[~2019-11-13  0:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-13  0:56 [LTP] [PATCH v2 0/3] fanotify musl fixes Petr Vorel
2019-11-13  0:56 ` Petr Vorel [this message]
2019-11-13  0:56 ` [LTP] [PATCH v2 2/3] fanotify: Rework checks for fallback definitions Petr Vorel
2019-11-13  0:56 ` [LTP] [PATCH v2 3/3] fanotify: Detect val vs. __val fanotify_event_info_fid.fsid member Petr Vorel
2019-11-13  5:58 ` [LTP] [PATCH v2 0/3] fanotify musl fixes Jan Stancek
2019-11-13  9:48 ` Cyril Hrubis
2019-11-14 18:17   ` Petr Vorel

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=20191113005626.19585-2-petr.vorel@gmail.com \
    --to=petr.vorel@gmail.com \
    --cc=ltp@lists.linux.it \
    /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