mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-08 10:04:42 +00:00
dm: Fix some issues from string operations
The patch fix some string operations issues and also improve readability of several snippet. Tracked-On: #2133 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Reviewed-by: Yonghua Huang <yonghua.huang@intel.com>
This commit is contained in:
@@ -52,10 +52,11 @@ int guest_domid = 1;
|
||||
int
|
||||
acrn_parse_gvtargs(char *arg)
|
||||
{
|
||||
if (parse_bdf(arg, &gvt_low_gm_sz, &gvt_high_gm_sz,
|
||||
&gvt_fence_sz, 10) != 0) {
|
||||
if (dm_strtoi(arg, &arg, 10, &gvt_low_gm_sz) != 0 ||
|
||||
dm_strtoi(arg, &arg, 10, &gvt_high_gm_sz) != 0 ||
|
||||
dm_strtoi(arg, &arg, 10, &gvt_fence_sz) != 0)
|
||||
return -1;
|
||||
}
|
||||
|
||||
printf("passed gvt-g optargs low_gm %d, high_gm %d, fence %d\n",
|
||||
gvt_low_gm_sz, gvt_high_gm_sz, gvt_fence_sz);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user