All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Brauner <brauner@kernel.org>
To: Eryu Guan <guaneryu@gmail.com>, Zorro Lang <zlang@redhat.com>,
	fstests <fstests@vger.kernel.org>
Cc: Christian Brauner <brauner@kernel.org>,
	Dave Chinner <david@fromorbit.com>,
	Amir Goldstein <amir73il@gmail.com>,
	Christoph Hellwig <hch@lst.de>, Jan Kara <jack@suse.cz>,
	"Darrick J. Wong" <djwong@kernel.org>
Subject: [PATCH 07/11] missing: move sys_execveat() to missing.h
Date: Thu, 28 Apr 2022 17:15:55 +0200	[thread overview]
Message-ID: <20220428151559.947144-8-brauner@kernel.org> (raw)
In-Reply-To: <20220428151559.947144-1-brauner@kernel.org>

The missing.h header provides syscalls potentially missing from the used
libc. Move the sys_execveat() definition into it. It doesn't belong into
vfstest.c.

Cc: Dave Chinner <david@fromorbit.com>
Cc: Amir Goldstein <amir73il@gmail.com>
Cc: Eryu Guan <guaneryu@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Zorro Lang <zlang@redhat.com>
Cc: "Darrick J. Wong" <djwong@kernel.org>
Cc: fstests <fstests@vger.kernel.org>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
---
 src/vfs/missing.h | 11 +++++++++++
 src/vfs/vfstest.c | 11 -----------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/vfs/missing.h b/src/vfs/missing.h
index c4f4cc32..059e742d 100644
--- a/src/vfs/missing.h
+++ b/src/vfs/missing.h
@@ -148,4 +148,15 @@ static inline int sys_umount2(const char *path, int flags)
 	return syscall(__NR_umount2, path, flags);
 }
 
+static inline int sys_execveat(int fd, const char *path, char **argv,
+			       char **envp, int flags)
+{
+#ifdef __NR_execveat
+	return syscall(__NR_execveat, fd, path, argv, envp, flags);
+#else
+	errno = ENOSYS;
+	return -1;
+#endif
+}
+
 #endif /* __IDMAP_MISSING_H */
diff --git a/src/vfs/vfstest.c b/src/vfs/vfstest.c
index c3eb5ae4..f6c8c194 100644
--- a/src/vfs/vfstest.c
+++ b/src/vfs/vfstest.c
@@ -226,17 +226,6 @@ __attribute__((unused)) static int print_r(int fd, const char *path)
 }
 #endif
 
-static int sys_execveat(int fd, const char *path, char **argv, char **envp,
-			int flags)
-{
-#ifdef __NR_execveat
-	return syscall(__NR_execveat, fd, path, argv, envp, flags);
-#else
-	errno = ENOSYS;
-	return -1;
-#endif
-}
-
 static void test_setup(struct vfstest_info *info)
 {
 	if (mkdirat(info->t_mnt_fd, T_DIR1, 0777))
-- 
2.32.0


  parent reply	other threads:[~2022-04-28 15:16 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-28 15:15 [PATCH 00/11] rename & split tests Christian Brauner
2022-04-28 15:15 ` [PATCH 01/11] src: rename idmapped-mounts folder Christian Brauner
2022-04-28 15:15 ` [PATCH 02/11] src/vfs: rename idmapped-mounts.c file Christian Brauner
2022-04-28 15:15 ` [PATCH 03/11] vfstest: rename struct t_idmapped_mounts Christian Brauner
2022-04-28 15:15 ` [PATCH 04/11] utils: add missing global.h include Christian Brauner
2022-04-28 15:15 ` [PATCH 06/11] utils: move helpers into utils Christian Brauner
2022-04-28 15:15 ` Christian Brauner [this message]
2022-04-28 15:15 ` [PATCH 08/11] utils: add struct test_suite Christian Brauner
2022-04-28 15:15 ` [PATCH 11/11] vfstest: split out remaining idmapped mount tests Christian Brauner
2022-04-29 15:20 ` [PATCH 00/11] rename & split tests Christoph Hellwig
2022-05-01 11:46 ` Zorro Lang
2022-05-07 12:01   ` Christian Brauner
2022-05-07 12:03   ` Christian Brauner
2022-05-07 12:50     ` Zorro Lang
2022-05-07 15:43       ` Christian Brauner

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=20220428151559.947144-8-brauner@kernel.org \
    --to=brauner@kernel.org \
    --cc=amir73il@gmail.com \
    --cc=david@fromorbit.com \
    --cc=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=zlang@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.