|
From: | Michael Tokarev |
Subject: | Re: util/async-teardown.c: is it really needed for --disable-system build? |
Date: | Sat, 12 Aug 2023 12:48:14 +0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.14.0 |
12.08.2023 12:38, Michael Tokarev wrote: ...
It smells like, at the very least, os-posix.c should be split. We shouldn't include a ton of qemu-system functionality (like very specific option parsing) into qemu-nbd for example. How about splitting os-posix.c into a few files in util/ (not in the root dir), and adding them to util_ss in case of posix-os? Ditto for os-win32.c, I guess, but I haven't looked at this. And for the question in $subj, this one needs to be guarded by CONFIG_SOFTMMU.
Or maybe better yet, put the softmmu-specific functions (one very good example here is os_parse_cmd_args() function - it clearly belongs to softmmu/, it should never has been in global os-foo.c but in some softmmu-os-foo.c instead. This way, async-teardown.c is moved to softmmu/ too, maybe os-linux-async-teardown.c. /mjt
[Prev in Thread] | Current Thread | [Next in Thread] |