lkml.org 
[lkml]   [2021]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH iproute2-next v2] lib/fs: fix issue when {name,open}_to_handle_at() is not implemented
Hi Petr,

Am Fr., 30. Apr. 2021 um 21:29 Uhr schrieb Petr Vorel <petr.vorel@gmail.com>:
>
> Hi,
>
> > > +++ b/lib/fs.c
> > > @@ -30,6 +30,27 @@
> > > /* if not already mounted cgroup2 is mounted here for iproute2's use */
> > > #define MNT_CGRP2_PATH "/var/run/cgroup2"
>
> > > +
> > > +#ifndef defined HAVE_HANDLE_AT
> > This is also wrong, it must be:
> > #ifndef HAVE_HANDLE_AT
>
> > > +struct file_handle {
> > > + unsigned handle_bytes;
> > > + int handle_type;
> > > + unsigned char f_handle[];
> > > +};
> > > +
> > > +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,
> > > + mount_id, flags);
> > Also I overlooked bogus 5 parameter, why is here? Correct is:
>
> > return syscall(__NR_name_to_handle_at, dfd, pathname, handle,
> > mount_id, flags);
> Uh, one more typo on my side, sorry (dfd => dirfd):
> return syscall(__NR_name_to_handle_at, dirfd, pathname, handle,
> mount_id, flags);
>

Thanks for the review and finding the sloppiness. I really should test
the changes before. Nevertheless, I will prepare a new version and
test it this time.

BR,
--
Heiko

\
 
 \ /
  Last update: 2021-05-02 10:36    [W:0.062 / U:0.048 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site