public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [pseudo][PATCH] fcntl: Add support for F_GETPIPE_SZ
@ 2021-08-11 15:58 Mike Crowe
  2021-08-11 21:38 ` [OE-core] " Richard Purdie
  0 siblings, 1 reply; 4+ messages in thread
From: Mike Crowe @ 2021-08-11 15:58 UTC (permalink / raw)
  To: openembedded-core; +Cc: Mike Crowe

When running the test suite on my Debian 11 box I see many occurrences
of:

 unknown fcntl argument 1032, assuming long argument.

(for example from test-execl.sh.)

It appears that this is F_GETPIPE_SZ and it takes no arguments. Let's
add it to avoid the warning messages.

I could add F_SETPIPE_SZ too, but that apparently takes an int argument
which would mean moving the va_arg call into the switch statement. :(

Signed-off-by: Mike Crowe <mac@mcrowe.com>
---
 ports/linux/guts/fcntl.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/ports/linux/guts/fcntl.c b/ports/linux/guts/fcntl.c
index 434c7f3..e9c6140 100644
--- a/ports/linux/guts/fcntl.c
+++ b/ports/linux/guts/fcntl.c
@@ -37,6 +37,9 @@
 	case F_GETOWN:
 	case F_GETSIG:
 	case F_GETLEASE:
+#if defined(F_GETPIPE_SZ)
+        case F_GETPIPE_SZ:
+#endif
 		rc = real_fcntl(fd, cmd);
 		break;
 	/* long argument */
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [OE-core] [pseudo][PATCH] fcntl: Add support for F_GETPIPE_SZ
  2021-08-11 15:58 [pseudo][PATCH] fcntl: Add support for F_GETPIPE_SZ Mike Crowe
@ 2021-08-11 21:38 ` Richard Purdie
  2021-08-12  7:46   ` Mike Crowe
       [not found]   ` <169A7F7B2DA70883.29477@lists.openembedded.org>
  0 siblings, 2 replies; 4+ messages in thread
From: Richard Purdie @ 2021-08-11 21:38 UTC (permalink / raw)
  To: yocto, openembedded-core; +Cc: Mike Crowe

On Wed, 2021-08-11 at 16:58 +0100, Mike Crowe via lists.openembedded.org wrote:
> When running the test suite on my Debian 11 box I see many occurrences
> of:
> 
>  unknown fcntl argument 1032, assuming long argument.
> 
> (for example from test-execl.sh.)
> 
> It appears that this is F_GETPIPE_SZ and it takes no arguments. Let's
> add it to avoid the warning messages.
> 
> I could add F_SETPIPE_SZ too, but that apparently takes an int argument
> which would mean moving the va_arg call into the switch statement. :(
> 
> Signed-off-by: Mike Crowe <mac@mcrowe.com>
> ---
>  ports/linux/guts/fcntl.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/ports/linux/guts/fcntl.c b/ports/linux/guts/fcntl.c
> index 434c7f3..e9c6140 100644
> --- a/ports/linux/guts/fcntl.c
> +++ b/ports/linux/guts/fcntl.c
> @@ -37,6 +37,9 @@
>  	case F_GETOWN:
>  	case F_GETSIG:
>  	case F_GETLEASE:
> +#if defined(F_GETPIPE_SZ)
> +        case F_GETPIPE_SZ:
> +#endif
>  		rc = real_fcntl(fd, cmd);
>  		break;
>  	/* long argument */

This goes make to making pseudo host specific which will break uninative/sstate.
We'll probably have to add a define if it isn't defined to get the behaviour we 
need.

It is probably only a question of time before some program is using F_SETPIPE_SZ
too :(

Cheers,

Richard


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [pseudo][PATCH] fcntl: Add support for F_GETPIPE_SZ
  2021-08-11 21:38 ` [OE-core] " Richard Purdie
@ 2021-08-12  7:46   ` Mike Crowe
       [not found]   ` <169A7F7B2DA70883.29477@lists.openembedded.org>
  1 sibling, 0 replies; 4+ messages in thread
From: Mike Crowe @ 2021-08-12  7:46 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Wednesday 11 August 2021 at 22:38:23 +0100, Richard Purdie wrote:
> On Wed, 2021-08-11 at 16:58 +0100, Mike Crowe via lists.openembedded.org wrote:
> > When running the test suite on my Debian 11 box I see many occurrences
> > of:
> > 
> >  unknown fcntl argument 1032, assuming long argument.
> > 
> > (for example from test-execl.sh.)
> > 
> > It appears that this is F_GETPIPE_SZ and it takes no arguments. Let's
> > add it to avoid the warning messages.
> > 
> > I could add F_SETPIPE_SZ too, but that apparently takes an int argument
> > which would mean moving the va_arg call into the switch statement. :(
> > 
> > Signed-off-by: Mike Crowe <mac@mcrowe.com>
> > ---
> >  ports/linux/guts/fcntl.c | 3 +++
> >  1 file changed, 3 insertions(+)
> > 
> > diff --git a/ports/linux/guts/fcntl.c b/ports/linux/guts/fcntl.c
> > index 434c7f3..e9c6140 100644
> > --- a/ports/linux/guts/fcntl.c
> > +++ b/ports/linux/guts/fcntl.c
> > @@ -37,6 +37,9 @@
> >  	case F_GETOWN:
> >  	case F_GETSIG:
> >  	case F_GETLEASE:
> > +#if defined(F_GETPIPE_SZ)
> > +        case F_GETPIPE_SZ:
> > +#endif
> >  		rc = real_fcntl(fd, cmd);
> >  		break;
> >  	/* long argument */
> 
> This goes make to making pseudo host specific which will break uninative/sstate.
> We'll probably have to add a define if it isn't defined to get the behaviour we 
> need.

Good point. I should have realised that.

> It is probably only a question of time before some program is using F_SETPIPE_SZ
> too :(

OK. I'll work on a new patch that supports F_GETPIPE_SZ and F_SETPIPE_SZ
without relying on the constants being available.

Thanks!

Mike.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [OE-core] [pseudo][PATCH] fcntl: Add support for F_GETPIPE_SZ
       [not found]   ` <169A7F7B2DA70883.29477@lists.openembedded.org>
@ 2021-08-13 10:07     ` Mike Crowe
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Crowe @ 2021-08-13 10:07 UTC (permalink / raw)
  To: Richard Purdie; +Cc: openembedded-core

On Thursday 12 August 2021 at 08:46:08 +0100, Mike Crowe via lists.openembedded.org wrote:
> On Wednesday 11 August 2021 at 22:38:23 +0100, Richard Purdie wrote:
> > On Wed, 2021-08-11 at 16:58 +0100, Mike Crowe via lists.openembedded.org wrote:
> > > When running the test suite on my Debian 11 box I see many occurrences
> > > of:
> > > 
> > >  unknown fcntl argument 1032, assuming long argument.
> > > 
> > > (for example from test-execl.sh.)
> > > 
> > > It appears that this is F_GETPIPE_SZ and it takes no arguments. Let's
> > > add it to avoid the warning messages.
> > > 
> > > I could add F_SETPIPE_SZ too, but that apparently takes an int argument
> > > which would mean moving the va_arg call into the switch statement. :(
> > > 
> > > Signed-off-by: Mike Crowe <mac@mcrowe.com>
> > > ---
> > >  ports/linux/guts/fcntl.c | 3 +++
> > >  1 file changed, 3 insertions(+)
> > > 
> > > diff --git a/ports/linux/guts/fcntl.c b/ports/linux/guts/fcntl.c
> > > index 434c7f3..e9c6140 100644
> > > --- a/ports/linux/guts/fcntl.c
> > > +++ b/ports/linux/guts/fcntl.c
> > > @@ -37,6 +37,9 @@
> > >  	case F_GETOWN:
> > >  	case F_GETSIG:
> > >  	case F_GETLEASE:
> > > +#if defined(F_GETPIPE_SZ)
> > > +        case F_GETPIPE_SZ:
> > > +#endif
> > >  		rc = real_fcntl(fd, cmd);
> > >  		break;
> > >  	/* long argument */
> > 
> > This goes make to making pseudo host specific which will break uninative/sstate.
> > We'll probably have to add a define if it isn't defined to get the behaviour we 
> > need.
> 
> Good point. I should have realised that.

Having said that, why doesn't that concern apply to F_DUPFD_CLOEXEC too? Do
we not care about systems that are so old that they don't have
F_DUPFD_CLOEXEC? In which case, why other with the #ifdef at all?

Similarly for F_OFD_GETLK and friends.

Mike.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-13 10:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-08-11 15:58 [pseudo][PATCH] fcntl: Add support for F_GETPIPE_SZ Mike Crowe
2021-08-11 21:38 ` [OE-core] " Richard Purdie
2021-08-12  7:46   ` Mike Crowe
     [not found]   ` <169A7F7B2DA70883.29477@lists.openembedded.org>
2021-08-13 10:07     ` Mike Crowe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox