public inbox for qemu-devel@nongnu.org
 help / color / mirror / Atom feed
* [PATCH] meson.build: stop checking for inotify_init()
@ 2026-03-11 12:40 Michael Tokarev
  2026-03-11 12:43 ` Michael Tokarev
  2026-03-11 16:02 ` Paolo Bonzini
  0 siblings, 2 replies; 4+ messages in thread
From: Michael Tokarev @ 2026-03-11 12:40 UTC (permalink / raw)
  To: Warner Losh, qemu-devel
  Cc: Michael Tokarev, Paolo Bonzini, Marc-André Lureau,
	Daniel P . Berrange, Philippe Mathieu-Daudé

the only place in qemu which used the check for inotify_init()
was linux-user, which now assumes inotify_init() is always
present.  There's no need to check for this function anymore.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
This is on top of:
 https://lore.kernel.org/qemu-trivial/20260119140557.2167351-2-mjt@tls.msk.ru/T/#u
which gets rid of usage of CONFIG_INOTIFY from linux-user/.

 meson.build | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/meson.build b/meson.build
index 5143639a19..a513d3eb3a 100644
--- a/meson.build
+++ b/meson.build
@@ -2675,15 +2675,12 @@ endif
 config_host_data.set('CONFIG_ASAN_IFACE_FIBER', have_asan_fiber)
 
 inotify = not_found
-have_inotify_init = cc.has_header_symbol('sys/inotify.h', 'inotify_init')
 have_inotify_init1 = cc.has_header_symbol('sys/inotify.h', 'inotify_init1')
-if (have_inotify_init or have_inotify_init1) and not cc.has_function('inotify_init1')
+if have_inotify_init1 and not cc.has_function('inotify_init1')
   # FreeBSD 14 and older need libinotify-kqueue wrapper
   inotify = cc.find_library('inotify')
-  have_inotify_init = have_inotify_init and inotify.found()
   have_inotify_init1 = have_inotify_init1 and inotify.found()
 endif
-config_host_data.set('CONFIG_INOTIFY', have_inotify_init)
 config_host_data.set('CONFIG_INOTIFY1', have_inotify_init1)
 
 # has_header_symbol
-- 
2.47.3



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

* Re: [PATCH] meson.build: stop checking for inotify_init()
  2026-03-11 12:40 [PATCH] meson.build: stop checking for inotify_init() Michael Tokarev
@ 2026-03-11 12:43 ` Michael Tokarev
  2026-03-11 16:02 ` Paolo Bonzini
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2026-03-11 12:43 UTC (permalink / raw)
  To: Warner Losh, qemu-devel
  Cc: Paolo Bonzini, Marc-André Lureau, Daniel P . Berrange,
	Philippe Mathieu-Daudé

On 11.03.2026 15:40, Michael Tokarev wrote:
> the only place in qemu which used the check for inotify_init()
> was linux-user, which now assumes inotify_init() is always
> present.  There's no need to check for this function anymore.
> 
> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
> ---
> This is on top of:
>   https://lore.kernel.org/qemu-trivial/20260119140557.2167351-2-mjt@tls.msk.ru/T/#u
> which gets rid of usage of CONFIG_INOTIFY from linux-user/.
> 
>   meson.build | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/meson.build b/meson.build
> index 5143639a19..a513d3eb3a 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -2675,15 +2675,12 @@ endif
>   config_host_data.set('CONFIG_ASAN_IFACE_FIBER', have_asan_fiber)
>   
>   inotify = not_found
> -have_inotify_init = cc.has_header_symbol('sys/inotify.h', 'inotify_init')
>   have_inotify_init1 = cc.has_header_symbol('sys/inotify.h', 'inotify_init1')
> -if (have_inotify_init or have_inotify_init1) and not cc.has_function('inotify_init1')
> +if have_inotify_init1 and not cc.has_function('inotify_init1')
>     # FreeBSD 14 and older need libinotify-kqueue wrapper
>     inotify = cc.find_library('inotify')
> -  have_inotify_init = have_inotify_init and inotify.found()

>     have_inotify_init1 = have_inotify_init1 and inotify.found()

This should be simplified further as

       have_inotify_init1 = inotify.found()

though I'm not sure how it's possible to have inotify_init1 symbol in
header but not in some library - either libc or libinotify.  Maybe this
whole if..endif can be simplified further.

>   endif

Thanks,

/mjt


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

* Re: [PATCH] meson.build: stop checking for inotify_init()
  2026-03-11 12:40 [PATCH] meson.build: stop checking for inotify_init() Michael Tokarev
  2026-03-11 12:43 ` Michael Tokarev
@ 2026-03-11 16:02 ` Paolo Bonzini
  2026-03-11 18:07   ` Michael Tokarev
  1 sibling, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2026-03-11 16:02 UTC (permalink / raw)
  To: Michael Tokarev
  Cc: Warner Losh, qemu-devel, Marc-André Lureau,
	Daniel P . Berrange, Philippe Mathieu-Daudé

Queued, thanks.

Paolo



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

* Re: [PATCH] meson.build: stop checking for inotify_init()
  2026-03-11 16:02 ` Paolo Bonzini
@ 2026-03-11 18:07   ` Michael Tokarev
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Tokarev @ 2026-03-11 18:07 UTC (permalink / raw)
  To: Paolo Bonzini
  Cc: Warner Losh, qemu-devel, Marc-André Lureau,
	Daniel P . Berrange, Philippe Mathieu-Daudé

On 11.03.2026 19:02, Paolo Bonzini wrote:
> Queued, thanks.

Please don't queue it up without the previous patch which
stops linux-user/ from checking CONFIG_INOTIFY.

https://lore.kernel.org/qemu-trivial/20260119140557.2167351-2-mjt@tls.msk.ru/T/#u

I planned to submit whole thing through the trivial-patches
tree for 11.0.

Or if you queue it up, please queue the mentioned patch before
this one.

Thanks,

/mjt


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

end of thread, other threads:[~2026-03-11 18:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 12:40 [PATCH] meson.build: stop checking for inotify_init() Michael Tokarev
2026-03-11 12:43 ` Michael Tokarev
2026-03-11 16:02 ` Paolo Bonzini
2026-03-11 18:07   ` Michael Tokarev

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