mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
tools/xl: don't crash on NULL command line
When running xl in a domU, it doesn't have access to the Xen command line. Before the non-truncating xc_xenver_cmdline(), it was always set with strdup, possibly of an empty string. Now it's NULL. Treat it the same as empty cmdline, as it was before. Autoballoon isn't relevant for xl devd in a domU anyway. Fixes:75f9160762("tools: Introduce a non-truncating xc_xenver_cmdline()") Signed-off-by: Marek Marczykowski-Górecki <marmarek@invisiblethingslab.com> Acked-by: Anthony PERARD <anthony.perard@vates.tech> master commit:a4988c4177master date: 2025-07-31 14:44:02 +0200
This commit is contained in:
1 parent
4072b0b24c
commit
7cda6b6509
1 file changed
+1
-1
+1
-1
@@ -79,7 +79,7 @@ static int auto_autoballoon(void)
|
||||
int ret;
|
||||
|
||||
info = libxl_get_version_info(ctx);
|
||||
if (!info)
|
||||
if (!info || !info->commandline)
|
||||
return 1; /* default to on */
|
||||
|
||||
#define SIZE_PATTERN "-?[0-9]+[bBkKmMgGtT]?"
|
||||
|
||||