All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] tools/xl: fix channel configuration setting
@ 2025-02-25  7:30 Juergen Gross
  2025-02-26 15:55 ` Anthony PERARD
  0 siblings, 1 reply; 5+ messages in thread
From: Juergen Gross @ 2025-02-25  7:30 UTC (permalink / raw)
  To: xen-devel; +Cc: Juergen Gross, Anthony PERARD

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().

Signed-off-by: Juergen Gross <jgross@suse.com>
---
V2:
- use ARRAY_EXTEND_INIT_NODEVID() (Anthony Perard)
---
 tools/xl/xl_parse.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 3d85be7dd4..089a88935a 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -2423,8 +2423,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);
-- 
2.43.0



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-03-03 10:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-25  7:30 [PATCH v2] tools/xl: fix channel configuration setting Juergen Gross
2025-02-26 15:55 ` Anthony PERARD
2025-02-27 15:10   ` Jürgen Groß
2025-02-28 17:34     ` Anthony PERARD
2025-03-03 10:17       ` Jürgen Groß

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.