mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-23 17:58:30 +00:00
hv:clear up the usage of printf data struct
The printf related functions have been called by other various functions, e.g. get_ptdev_info(), get_ioapic_info, etc. The patch is used to clear up the usage. Tracked-On: #861 Signed-off-by: Junjun Shan <junjun.shan@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -113,11 +113,11 @@ void vcpu_thread(struct vcpu *vcpu)
|
||||
}
|
||||
|
||||
#ifdef HV_DEBUG
|
||||
void get_vmexit_profile(char *str_arg, int str_max)
|
||||
void get_vmexit_profile(char *str_arg, size_t str_max)
|
||||
{
|
||||
char *str = str_arg;
|
||||
uint16_t cpu, i;
|
||||
int len, size = str_max;
|
||||
size_t len, size = str_max;
|
||||
|
||||
len = snprintf(str, size, "\r\nNow(us) = %16lld\r\n",
|
||||
ticks_to_us(rdtsc()));
|
||||
|
@@ -185,7 +185,7 @@ 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",
|
||||
snprintf(dyn_bootargs, 100U, " cma=%dM@0x%llx",
|
||||
(e820_mem.max_ram_blk_size >> 20),
|
||||
e820_mem.max_ram_blk_base);
|
||||
(void)strcpy_s((char *)hva
|
||||
@@ -208,7 +208,7 @@ int general_sw_loader(struct vm *vm, struct vcpu *vcpu)
|
||||
3;
|
||||
#endif
|
||||
if (reserving_1g_pages > 0) {
|
||||
snprintf(dyn_bootargs, 100,
|
||||
snprintf(dyn_bootargs, 100U,
|
||||
" hugepagesz=1G hugepages=%d",
|
||||
reserving_1g_pages);
|
||||
(void)strcpy_s((char *)hva
|
||||
|
Reference in New Issue
Block a user