On 16.07.25 23:15, Jason Andryuk wrote:
Factor out the xenstore setup code into configure_xenstore(). This is in preparation for handling already-introduced domains.Signed-off-by: Jason Andryuk <jason.andr...@amd.com> --- tools/helpers/init-dom0less.c | 51 ++++++++++++++++++++++++----------- 1 file changed, 36 insertions(+), 15 deletions(-) diff --git a/tools/helpers/init-dom0less.c b/tools/helpers/init-dom0less.c index a182dce563..6ae7cf2e7e 100644 --- a/tools/helpers/init-dom0less.c +++ b/tools/helpers/init-dom0less.c @@ -235,43 +235,43 @@ err: return rc; }-static int init_domain(struct xs_handle *xsh,- struct xc_interface_core *xch, - xenforeignmemory_handle *xfh, - libxl_dominfo *info) +static int configure_xenstore(struct xs_handle *xsh, + struct xc_interface_core *xch, + xenforeignmemory_handle *xfh, + libxl_dominfo *info, + uint64_t *xenstore_evtchn, + uint64_t *xenstore_pfn)
This is becoming a little bit convoluted. Wouldn't it be better to have a struct containing most of the parameters (at least the handles and info)? An alternative might be to make those global variables in order to avoid passing them around everywhere. Juergen
OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key
OpenPGP_signature.asc
Description: OpenPGP digital signature