[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 31/53] include: move os_*() to os-foo.h
From: |
Paolo Bonzini |
Subject: |
[PULL 31/53] include: move os_*() to os-foo.h |
Date: |
Tue, 19 Apr 2022 07:50:47 +0200 |
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>
Message-Id: <20220323155743.1585078-27-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@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 1fbc20e4bc..a271cac66a 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 23bd45457d..58de7c994d 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 1351d1d29e..3c74a78e33 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 e31c921983..6f21b57841 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
- [PULL 05/53] oslib: drop qemu_gettimeofday(), (continued)
- [PULL 05/53] oslib: drop qemu_gettimeofday(), Paolo Bonzini, 2022/04/19
- [PULL 03/53] qga: replace qemu_gettimeofday() with g_get_real_time(), Paolo Bonzini, 2022/04/19
- [PULL 04/53] Replace qemu_gettimeofday() with g_get_real_time(), Paolo Bonzini, 2022/04/19
- [PULL 13/53] osdep: poison {HOST,TARGET}_WORDS_BIGENDIAN, Paolo Bonzini, 2022/04/19
- [PULL 09/53] meson: remove test-qdev-global-props dependency on testqapi, Paolo Bonzini, 2022/04/19
- [PULL 10/53] char: move qemu_openpty_raw from util/ to char/, Paolo Bonzini, 2022/04/19
- [PULL 17/53] qga: replace deprecated g_get_current_time(), Paolo Bonzini, 2022/04/19
- [PULL 12/53] Replace TARGET_WORDS_BIGENDIAN, Paolo Bonzini, 2022/04/19
- [PULL 02/53] qtest: replace gettimeofday with GTimer, Paolo Bonzini, 2022/04/19
- [PULL 15/53] tests: replace free_all() usage with g_auto, Paolo Bonzini, 2022/04/19
- [PULL 31/53] include: move os_*() to os-foo.h,
Paolo Bonzini <=
- [PULL 33/53] Move CPU softfloat unions to cpu-float.h, Paolo Bonzini, 2022/04/19
- [PULL 34/53] Move fcntl_setfl() to oslib-posix, Paolo Bonzini, 2022/04/19
- [PULL 35/53] qga: remove explicit environ argument from exec/spawn, Paolo Bonzini, 2022/04/19
- [PULL 28/53] include: move target page bits declaration to page-vary.h, Paolo Bonzini, 2022/04/19
- [PULL 29/53] include: move progress API to qemu-progress.h, Paolo Bonzini, 2022/04/19
- [PULL 45/53] hyperv: Add definitions for syndbg, Paolo Bonzini, 2022/04/19
- [PULL 46/53] hyperv: Add support to process syndbg commands, Paolo Bonzini, 2022/04/19
- [PULL 36/53] Remove qemu-common.h include from most units, Paolo Bonzini, 2022/04/19
- [PULL 48/53] s390x: follow qdev tree to detect SCSI device on a CCW bus, Paolo Bonzini, 2022/04/19
- [PULL 22/53] include: move qemu_write_full() declaration to osdep.h, Paolo Bonzini, 2022/04/19