From: Petr Vorel <petr.vorel@gmail.com>
To: Heiko Thiery <heiko.thiery@gmail.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Stephen Hemminger <stephen@networkplumber.org>
Subject: Re: [PATCH iproute2-next v2] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented
Date: Fri, 30 Apr 2021 20:43:09 +0200 [thread overview]
Message-ID: <YIxPve/JoSv3GAwm@pevik> (raw)
In-Reply-To: <20210430062632.21304-1-heiko.thiery@gmail.com>
Hi Heiko,
...
> +++ b/lib/fs.c
> +int name_to_handle_at(int dirfd, const char *pathname,
> + struct file_handle *handle, int *mount_id, int flags)
> +{
> + return syscall(name_to_handle_at, 5, dirfd, pathname, handle,
I overlooked this in v1. name_to_handle_at must be replaced by __NR_name_to_handle_at:
(name_to_handle_at is the function name, not a syscall number).
It also requires to include <sys/syscall.h>:
#include <sys/syscall.h>
...
return syscall(__NR_name_to_handle_at, 5, dirfd, pathname, handle,
mount_id, flags);
> + mount_id, flags);
> +}
> +
> +int open_by_handle_at(int mount_fd, struct file_handle *handle, int flags)
> +{
> + return syscall(open_by_handle_at, 3, mount_fd, handle, flags);
And here needs to be __NR_open_by_handle_at
Kind regards,
Petr
> +}
> +#endif
> +
> /* return mount path of first occurrence of given fstype */
> static char *find_fs_mount(const char *fs_to_find)
> {
next prev parent reply other threads:[~2021-04-30 18:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-30 6:26 [PATCH iproute2-next v2] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented Heiko Thiery
2021-04-30 18:43 ` Petr Vorel [this message]
2021-04-30 19:07 ` Petr Vorel
2021-04-30 19:29 ` Petr Vorel
2021-05-02 8:35 ` Heiko Thiery
2021-05-02 11:16 ` Petr Vorel
2021-05-01 15:03 ` David Ahern
2021-05-02 8:38 ` Heiko Thiery
2021-05-02 11:20 ` Petr Vorel
2021-05-02 13:07 ` David Ahern
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=YIxPve/JoSv3GAwm@pevik \
--to=petr.vorel@gmail.com \
--cc=heiko.thiery@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/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.