[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH] plat/xen: x86: Maximum command line length from Xen headers



Instead of defining an own maximum size for the command line, in this
commit we use `MAX_GUEST_CMDLINE` from the Xen headers to defining the
maximum command line length.

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 plat/xen/x86/setup.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/plat/xen/x86/setup.c b/plat/xen/x86/setup.c
index 14b2c26f..7882ebef 100644
--- a/plat/xen/x86/setup.c
+++ b/plat/xen/x86/setup.c
@@ -90,8 +90,7 @@
 #include <xen/arch-x86/cpuid.h>
 #include <xen/arch-x86/hvm/start_info.h>
 
-#define MAX_CMDLINE_SIZE 1024
-static char cmdline[MAX_CMDLINE_SIZE];
+static char cmdline[MAX_GUEST_CMDLINE];
 
 start_info_t *HYPERVISOR_start_info;
 shared_info_t *HYPERVISOR_shared_info;
@@ -180,7 +179,7 @@ void _libxenplat_x86entry(void *start_info)
        _init_shared_info(); /* remaps shared info */
 
        strncpy(cmdline, (char *)HYPERVISOR_start_info->cmd_line,
-               MAX_CMDLINE_SIZE);
+               MAX_GUEST_CMDLINE);
 
        /* Set up events. */
        init_events();
@@ -193,5 +192,5 @@ void _libxenplat_x86entry(void *start_info)
 
        init_console();
 
-       ukplat_entry_argp(CONFIG_UK_NAME, cmdline, MAX_CMDLINE_SIZE);
+       ukplat_entry_argp(CONFIG_UK_NAME, cmdline, MAX_GUEST_CMDLINE);
 }
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.