[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 26/32] include: move os_*() to os-foo.h
From: |
marcandre . lureau |
Subject: |
[PATCH 26/32] include: move os_*() to os-foo.h |
Date: |
Wed, 23 Mar 2022 19:57:37 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
For consistency with other os_ functions that do not have POSIX
implementation, declare an inline function for the stub in os-win32.h.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
---
include/qemu-common.h | 4 ----
include/sysemu/os-posix.h | 2 ++
include/sysemu/os-win32.h | 4 +++-
os-win32.c | 9 ---------
4 files changed, 5 insertions(+), 14 deletions(-)
diff --git a/include/qemu-common.h b/include/qemu-common.h
index 1fbc20e4bcf7..a271cac66a1b 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -24,10 +24,6 @@
int qemu_main(int argc, char **argv, char **envp);
#endif
-/* OS specific functions */
-void os_setup_early_signal_handling(void);
-int os_parse_cmd_args(int index, const char *optarg);
-
void page_size_init(void);
#endif
diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h
index dd64fb401dfb..a49c6848ff1a 100644
--- a/include/sysemu/os-posix.h
+++ b/include/sysemu/os-posix.h
@@ -42,7 +42,9 @@
extern "C" {
#endif
+int os_parse_cmd_args(int index, const char *optarg);
void os_set_line_buffering(void);
+void os_setup_early_signal_handling(void);
void os_set_proc_name(const char *s);
void os_setup_signal_handling(void);
void os_daemonize(void);
diff --git a/include/sysemu/os-win32.h b/include/sysemu/os-win32.h
index 770752222ae3..c0ba65389986 100644
--- a/include/sysemu/os-win32.h
+++ b/include/sysemu/os-win32.h
@@ -62,8 +62,10 @@ struct tm *localtime_r(const time_t *timep, struct tm
*result);
static inline void os_setup_signal_handling(void) {}
static inline void os_daemonize(void) {}
static inline void os_setup_post(void) {}
-void os_set_line_buffering(void);
static inline void os_set_proc_name(const char *dummy) {}
+static inline int os_parse_cmd_args(int index, const char *optarg) { return
-1; }
+void os_set_line_buffering(void);
+void os_setup_early_signal_handling(void);
int getpagesize(void);
diff --git a/os-win32.c b/os-win32.c
index e31c921983b4..6f21b578417c 100644
--- a/os-win32.c
+++ b/os-win32.c
@@ -61,12 +61,3 @@ void os_set_line_buffering(void)
setbuf(stdout, NULL);
setbuf(stderr, NULL);
}
-
-/*
- * Parse OS specific command line options.
- * return 0 if option handled, -1 otherwise
- */
-int os_parse_cmd_args(int index, const char *optarg)
-{
- return -1;
-}
--
2.35.1.273.ge6ebfd0e8cbb
- [PATCH 17/32] include: move qemu_write_full() declaration to osdep.h, (continued)
- [PATCH 17/32] include: move qemu_write_full() declaration to osdep.h, marcandre . lureau, 2022/03/23
- [PATCH 19/32] include: move coroutine IO functions to coroutine.h, marcandre . lureau, 2022/03/23
- [PATCH 20/32] include: move dump_in_progress() to runstate.h, marcandre . lureau, 2022/03/23
- [PATCH 21/32] include: move C/util-related declarations to cutils.h, marcandre . lureau, 2022/03/23
- [PATCH 22/32] include: move cpu_exec* declarations to cpu-common.h, marcandre . lureau, 2022/03/23
- [PATCH 23/32] include: move target page bits declaration to page-vary.h, marcandre . lureau, 2022/03/23
- [PATCH 24/32] include: move progress API to qemu-progress.h, marcandre . lureau, 2022/03/23
- [PATCH 25/32] include: move qemu_get_vm_name() to sysemu.h, marcandre . lureau, 2022/03/23
- [PATCH 26/32] include: move os_*() to os-foo.h,
marcandre . lureau <=
- [PATCH 29/32] Move fcntl_setfl() to oslib-posix, marcandre . lureau, 2022/03/23
- [PATCH 27/32] include: move page_size_init() to include/hw/core/cpu.h, marcandre . lureau, 2022/03/23
- [PATCH 28/32] Move CPU softfloat unions to cpu-float.h, marcandre . lureau, 2022/03/23
- [PATCH 30/32] qga: remove explicit environ argument from exec/spawn, marcandre . lureau, 2022/03/23
- [PATCH 31/32] RFC: Simplify softmmu/main.c, marcandre . lureau, 2022/03/23