mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-19 20:22:46 +00:00
dm: use MAX_VM_NAME_LEN instead of MAX_VMNAME_LEN
use the common MAX_VM_NAME_LEN to keep sync with hypervisor. Tracked-On: #6685 Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
This commit is contained in:
parent
b864cef228
commit
a87fa12895
@ -1007,8 +1007,8 @@ main(int argc, char *argv[])
|
||||
|
||||
vmname = argv[0];
|
||||
|
||||
if (strnlen(vmname, MAX_VMNAME_LEN) >= MAX_VMNAME_LEN) {
|
||||
pr_err("The name of the VM exceeds the maximum length: %u\n", MAX_VMNAME_LEN - 1);
|
||||
if (strnlen(vmname, MAX_VM_NAME_LEN) >= MAX_VM_NAME_LEN) {
|
||||
pr_err("The name of the VM exceeds the maximum length: %u\n", MAX_VM_NAME_LEN - 1);
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
@ -210,7 +210,7 @@ vm_create(const char *name, uint64_t req_buf, int *vcpu_num)
|
||||
|
||||
/* command line arguments specified CPU affinity could overwrite HV's static configuration */
|
||||
create_vm.cpu_affinity = cpu_affinity_bitmap;
|
||||
strncpy((char *)create_vm.name, name, strnlen(name, MAX_VMNAME_LEN));
|
||||
strncpy((char *)create_vm.name, name, strnlen(name, MAX_VM_NAME_LEN));
|
||||
|
||||
if (is_rtvm) {
|
||||
create_vm.vm_flag |= GUEST_FLAG_RT;
|
||||
|
@ -91,7 +91,7 @@ typedef void* (*ioc_work)(void *arg);
|
||||
* IOC mediator and virtual UART communication channel path,
|
||||
* comes from DM command line parameters.
|
||||
*/
|
||||
static char virtual_uart_path[32 + MAX_VMNAME_LEN];
|
||||
static char virtual_uart_path[32 + MAX_VM_NAME_LEN];
|
||||
|
||||
/*
|
||||
* To activate CBC signal channel(/dev/cbc-signals).
|
||||
|
@ -32,8 +32,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "types.h"
|
||||
#include "dm_string.h"
|
||||
|
||||
#define MAX_VMNAME_LEN 16U
|
||||
#include "acrn_common.h"
|
||||
|
||||
struct vmctx;
|
||||
extern uint8_t trusty_enabled;
|
||||
|
Loading…
Reference in New Issue
Block a user