mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
hv: not necessary to deal with '\n' of cmdline in ACRN.
We removed '\n' in bootargs file so there is no '\n' attached to cmdline when stitching ACRN. Then we don't need to deal with it in ACRN. Signed-off-by: Yin Fengwei <fengwei.yin@intel.com> Acked-by: Eddie Dong <Eddie.dong@intel.com>
This commit is contained in:
@@ -190,12 +190,11 @@ int general_sw_loader(struct vm *vm, struct vcpu *vcpu)
|
||||
#ifdef CONFIG_CMA
|
||||
/* add "cma=XXXXM@0xXXXXXXXX" to cmdline*/
|
||||
if (is_vm0(vm) && (e820_mem.max_ram_blk_size > 0)) {
|
||||
snprintf(dyn_bootargs, 100, " cma=%dM@0x%llx\n",
|
||||
snprintf(dyn_bootargs, 100, " cma=%dM@0x%llx",
|
||||
(e820_mem.max_ram_blk_size >> 20),
|
||||
e820_mem.max_ram_blk_base);
|
||||
/* Delete '\n' at the end of cmdline */
|
||||
strcpy_s((char *)hva
|
||||
+vm->sw.linux_info.bootargs_size - 1,
|
||||
+vm->sw.linux_info.bootargs_size,
|
||||
100, dyn_bootargs);
|
||||
}
|
||||
#else
|
||||
@@ -215,11 +214,10 @@ int general_sw_loader(struct vm *vm, struct vcpu *vcpu)
|
||||
#endif
|
||||
if (reserving_1g_pages > 0) {
|
||||
snprintf(dyn_bootargs, 100,
|
||||
" hugepagesz=1G hugepages=%d\n",
|
||||
" hugepagesz=1G hugepages=%d",
|
||||
reserving_1g_pages);
|
||||
/* Delete '\n' at the end of cmdline */
|
||||
strcpy_s((char *)hva
|
||||
+vm->sw.linux_info.bootargs_size - 1,
|
||||
+vm->sw.linux_info.bootargs_size,
|
||||
100, dyn_bootargs);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user