From: Juergen Gross Date: Thu, 20 Mar 2025 12:17:41 +0000 (+0100) Subject: tools/xl: fix channel configuration setting X-Git-Tag: RELEASE-4.19.2~40 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=7c767b7093ad4f6f53760f84eef51d9ca585a7a0;p=xen.git tools/xl: fix channel configuration setting Channels work differently than other device types: their devid should be -1 initially in order to distinguish them from the primary console which has the devid of 0. So when parsing the channel configuration, use ARRAY_EXTEND_INIT_NODEVID() in order to avoid overwriting the devid set by libxl_device_channel_init(). Fixes: 3a6679634766 ("libxl: set channel devid when not provided by application") Signed-off-by: Juergen Gross Reviewed-by: Anthony PERARD master commit: e1ccced4afe465d6541c5825a0f8d1b8f5fa4253 master date: 2025-03-05 16:37:37 +0100 --- diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c index e3a4800f6e..9018efa117 100644 --- a/tools/xl/xl_parse.c +++ b/tools/xl/xl_parse.c @@ -2387,8 +2387,9 @@ void parse_config_data(const char *config_source, char *path = NULL; int len; - chn = ARRAY_EXTEND_INIT(d_config->channels, d_config->num_channels, - libxl_device_channel_init); + chn = ARRAY_EXTEND_INIT_NODEVID(d_config->channels, + d_config->num_channels, + libxl_device_channel_init); split_string_into_string_list(buf, ",", &pairs); len = libxl_string_list_length(&pairs);