lkml.org 
[lkml]   [2021]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH iproute2-next v2] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented
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)
> {

\
 
 \ /
  Last update: 2021-04-30 20:44    [W:0.141 / U:0.368 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site