diff options
| author | Philippe Mathieu-Daudé <philmd@linaro.org> | 2023-11-20 15:33:19 +0100 |
|---|---|---|
| committer | Philippe Mathieu-Daudé <philmd@linaro.org> | 2024-01-05 16:20:15 +0100 |
| commit | b622ee98bf784b093494a81c46667bd6e6324f1a (patch) | |
| tree | bf78144d2d71206051edc91e74f1fb50e55d3faf /util/oslib-win32.c | |
| parent | 3961613a760766921cdd6423ced0f801c2a6f1fc (diff) | |
| download | focaccia-qemu-b622ee98bf784b093494a81c46667bd6e6324f1a.tar.gz focaccia-qemu-b622ee98bf784b093494a81c46667bd6e6324f1a.zip | |
util/oslib: Have qemu_prealloc_mem() handler return a boolean
Following the example documented since commit e3fe3988d7 ("error:
Document Error API usage rules"), have qemu_prealloc_mem()
return a boolean indicating whether an error is set or not.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Message-Id: <20231120213301.24349-19-philmd@linaro.org>
Diffstat (limited to 'util/oslib-win32.c')
| -rw-r--r-- | util/oslib-win32.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/util/oslib-win32.c b/util/oslib-win32.c index 55b0189dc3..c4a5f05a49 100644 --- a/util/oslib-win32.c +++ b/util/oslib-win32.c @@ -264,7 +264,7 @@ int getpagesize(void) return system_info.dwPageSize; } -void qemu_prealloc_mem(int fd, char *area, size_t sz, int max_threads, +bool qemu_prealloc_mem(int fd, char *area, size_t sz, int max_threads, ThreadContext *tc, Error **errp) { int i; @@ -274,6 +274,8 @@ void qemu_prealloc_mem(int fd, char *area, size_t sz, int max_threads, for (i = 0; i < sz / pagesize; i++) { memset(area + pagesize * i, 0, 1); } + + return true; } char *qemu_get_pid_name(pid_t pid) |