public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Yang Xu <xuyang2018.jy@fujitsu.com>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 1/3] include/faccessat.h: Add header file faccessat.h
Date: Thu, 10 Aug 2023 16:29:09 +0200	[thread overview]
Message-ID: <ZNT0NesFgNyVjkv8@yuki> (raw)
In-Reply-To: <1691208482-5464-1-git-send-email-xuyang2018.jy@fujitsu.com>

Hi!
> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
> ---
>  include/lapi/faccessat.h | 21 +++++++++++++++++++++
>  1 file changed, 21 insertions(+)
>  create mode 100644 include/lapi/faccessat.h
> 
> diff --git a/include/lapi/faccessat.h b/include/lapi/faccessat.h
> new file mode 100644
> index 000000000..f3318fd7a
> --- /dev/null
> +++ b/include/lapi/faccessat.h
> @@ -0,0 +1,21 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (c) 2023 FUJITSU LIMITED. All rights reserved.
> + * Copyright (c) Linux Test Project, 2003-2023
> + * Author: Yang Xu <xuyang2018.jy@fujitsu.com>
> + */
> +
> +#ifndef FACCESSAT_H
> +#define FACCESSAT_H
> +
> +#include <sys/types.h>
> +#include "lapi/syscalls.h"
> +
> +#ifndef HAVE_FACCESSAT
> +int faccessat(int dirfd, const char *pathname, int mode, int flags)
> +{
> +	return tst_syscall(__NR_faccessat, dirfd, pathname, mode, flags);
> +}
> +#endif

I guess that this will not work without:

diff --git a/configure.ac b/configure.ac
index e4aa2cadf..7beca3d9f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,6 +92,7 @@ AC_CHECK_FUNCS_ONCE([ \
     epoll_pwait \
     epoll_pwait2 \
     execveat \
+    faccessat \
     fallocate \
     fchownat \
     fsconfig \


However looking at man faccessat, it was added into glibc 2.10 and since
the oldest glibc we support is 2.17 (see
doc/supported-kernel-libc-versions.txt) we can as well completely drop
this fallback definition.

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  parent reply	other threads:[~2023-08-10 14:28 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-05  4:07 [LTP] [PATCH 1/3] include/faccessat.h: Add header file faccessat.h Yang Xu
2023-08-05  4:07 ` [LTP] [PATCH 2/3] syscalls/faccessat01: Convert to new API Yang Xu
2023-08-05  4:07 ` [LTP] [PATCH 3/3] syscalls/faccessat02: Move errnos check to faccessat02 Yang Xu
2023-08-05  4:07 ` [LTP] [PATCH 1/2] syscalls/faccessat201: Add new testcase Yang Xu
2023-08-10 14:54   ` Cyril Hrubis
2023-08-11 11:59     ` Cyril Hrubis
2023-08-22  9:50       ` Yang Xu (Fujitsu)
2023-08-22  9:45     ` Yang Xu (Fujitsu)
2023-08-05  4:08 ` [LTP] [PATCH 2/2] syscalls/faccessat202: " Yang Xu
2023-08-05  4:08 ` [LTP] [PATCH 1/2] syscalls/readlinkat01: Convert to new API Yang Xu
2023-08-05  4:08 ` [LTP] [PATCH 2/2] syscalls/readlinkat02: " Yang Xu
2023-08-10 14:29 ` Cyril Hrubis [this message]
2023-08-21 11:26   ` [LTP] [PATCH 1/3] include/faccessat.h: Add header file faccessat.h Yang Xu (Fujitsu)

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=ZNT0NesFgNyVjkv8@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=xuyang2018.jy@fujitsu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox