On Sat, 12 Aug 2023 12:48:14 +0300 Michael Tokarev <m...@tls.msk.ru> wrote:
> 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 I think we could guard the offending item with CONFIG_SOFTMMU for now, to immediately fix the issues you raised, and do the refactoring you proposed later (e.g. next cycle). what do you think?