diff mbox series

[v2,8/8] softmmu: remove is_daemonized() method

Message ID 20220304185620.3272401-9-berrange@redhat.com (mailing list archive)
State New, archived
Headers show
Series softmmu: move and refactor -runas, -chroot and -daemonize | expand

Commit Message

Daniel P. Berrangé March 4, 2022, 6:56 p.m. UTC
There are no longer any users of this method, so it can be removed to
prevent future accidental (mis)use.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
 include/sysemu/os-posix.h | 2 --
 include/sysemu/os-win32.h | 5 -----
 os-posix.c                | 5 -----
 stubs/is-daemonized.c     | 9 ---------
 stubs/meson.build         | 1 -
 5 files changed, 22 deletions(-)
 delete mode 100644 stubs/is-daemonized.c

Comments

Eric Blake March 4, 2022, 10:11 p.m. UTC | #1
On Fri, Mar 04, 2022 at 06:56:20PM +0000, Daniel P. Berrangé wrote:
> There are no longer any users of this method, so it can be removed to
> prevent future accidental (mis)use.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  include/sysemu/os-posix.h | 2 --
>  include/sysemu/os-win32.h | 5 -----
>  os-posix.c                | 5 -----
>  stubs/is-daemonized.c     | 9 ---------
>  stubs/meson.build         | 1 -
>  5 files changed, 22 deletions(-)
>  delete mode 100644 stubs/is-daemonized.c

Reviewed-by: Eric Blake <eblake@redhat.com>
diff mbox series

Patch

diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h
index 390f3f8396..2c375f5b49 100644
--- a/include/sysemu/os-posix.h
+++ b/include/sysemu/os-posix.h
@@ -57,8 +57,6 @@  int os_mlock(void);
 typedef struct timeval qemu_timeval;
 #define qemu_gettimeofday(tp) gettimeofday(tp, NULL)
 
-bool is_daemonized(void);
-
 /**
  * qemu_alloc_stack:
  * @sz: pointer to a size_t holding the requested usable stack size
diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
index 4879f8731d..a81f4fa9c1 100644
--- a/include/sysemu/os-win32.h
+++ b/include/sysemu/os-win32.h
@@ -76,11 +76,6 @@  typedef struct {
 } qemu_timeval;
 int qemu_gettimeofday(qemu_timeval *tp);
 
-static inline bool is_daemonized(void)
-{
-    return false;
-}
-
 static inline int os_mlock(void)
 {
     return -ENOSYS;
diff --git a/os-posix.c b/os-posix.c
index f598a52a4f..bd1140ab22 100644
--- a/os-posix.c
+++ b/os-posix.c
@@ -232,11 +232,6 @@  void os_set_line_buffering(void)
     setvbuf(stdout, NULL, _IOLBF, 0);
 }
 
-bool is_daemonized(void)
-{
-    return daemonize;
-}
-
 int os_mlock(void)
 {
 #ifdef HAVE_MLOCKALL
diff --git a/stubs/is-daemonized.c b/stubs/is-daemonized.c
deleted file mode 100644
index 8f63325bb2..0000000000
--- a/stubs/is-daemonized.c
+++ /dev/null
@@ -1,9 +0,0 @@ 
-#include "qemu/osdep.h"
-
-/* Win32 has its own inline stub */
-#ifndef _WIN32
-bool is_daemonized(void)
-{
-    return false;
-}
-#endif
diff --git a/stubs/meson.build b/stubs/meson.build
index d359cbe1ad..3d092b808e 100644
--- a/stubs/meson.build
+++ b/stubs/meson.build
@@ -18,7 +18,6 @@  if linux_io_uring.found()
 endif
 stub_ss.add(files('iothread-lock.c'))
 stub_ss.add(files('isa-bus.c'))
-stub_ss.add(files('is-daemonized.c'))
 if libaio.found()
   stub_ss.add(files('linux-aio.c'))
 endif