mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 18:14:53 +00:00
DM/HV: Increase VM name len
VM Name length is restricted to 32 characters. kata creates a VM name with GUID added as a part of VM name making it around 80 characters. So increasing this size to 128. v1->v2: It turns out that MAX_VM_OS_NAME_LEN usage in DM and HV are for different use cases. So removing the macro from acrn_common.h. Definied macro MAX_VMNAME_LEN for DM purposes in dm.h. Retaining original macron name MAX_VM_OS_NAME_LEN for HV purposes but defined in vm_config.h. Tracked-On: #3138 Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com> Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
committed by
ACRN System Integration
parent
f010f99d67
commit
517707dee4
@@ -30,7 +30,7 @@
|
||||
/* acrnd worker timer */
|
||||
|
||||
struct work_arg {
|
||||
char name[MAX_VM_OS_NAME_LEN];
|
||||
char name[MAX_VMNAME_LEN];
|
||||
};
|
||||
|
||||
struct acrnd_work {
|
||||
@@ -360,7 +360,7 @@ static void handle_timer_req(struct mngr_msg *msg, int client_fd, void *param)
|
||||
}
|
||||
|
||||
strncpy(arg.name, msg->data.acrnd_timer.name, sizeof(arg.name) - 1);
|
||||
if (sizeof(arg.name) - 1 < strnlen(msg->data.acrnd_timer.name, MAX_VM_OS_NAME_LEN)) {
|
||||
if (sizeof(arg.name) - 1 < strnlen(msg->data.acrnd_timer.name, MAX_VMNAME_LEN)) {
|
||||
perror("timer name was truncated\n");
|
||||
goto reply_ack;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user