libxl: create: setdefault: Make libxl_physinfo info[1]

No functional change.  This will let us make it into a pointer without
textual change other than to the definition.

While we are here, fix some style errors (missing { }).

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Wei Liu <wl@xen.org>
Release-acked-by: Juergen Gross <jgross@suse.com>
This commit is contained in:
Ian Jackson committed 2019-10-24 16:08:41 +01:00
1 parent 5dedc18d64
commit af5c475dee
1 file changed
+8 -8
+8 -8
View File
@@ -30,10 +30,10 @@
int libxl__domain_create_info_setdefault(libxl__gc *gc,
libxl_domain_create_info *c_info)
{
libxl_physinfo info;
libxl_physinfo info[1];
int rc;
rc = libxl_get_physinfo(CTX, &info);
rc = libxl_get_physinfo(CTX, info);
if (rc)
return rc;
@@ -45,11 +45,11 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc,
libxl__arch_domain_create_info_setdefault(gc, c_info);
if (c_info->type != LIBXL_DOMAIN_TYPE_PV) {
if (info.cap_hap)
if (info->cap_hap) {
libxl_defbool_setdefault(&c_info->hap, true);
else if (info.cap_shadow)
} else if (info->cap_shadow) {
libxl_defbool_setdefault(&c_info->hap, false);
else {
} else {
LOG(ERROR, "neither hap nor shadow paging available");
return ERROR_INVAL;
}
@@ -63,12 +63,12 @@ int libxl__domain_create_info_setdefault(libxl__gc *gc,
if (!c_info->ssidref)
c_info->ssidref = SECINITSID_DOMU;
if (info.cap_hvm_directio &&
if (info->cap_hvm_directio &&
(c_info->passthrough == LIBXL_PASSTHROUGH_UNKNOWN)) {
c_info->passthrough = ((c_info->type == LIBXL_DOMAIN_TYPE_PV) ||
!info.cap_iommu_hap_pt_share) ?
!info->cap_iommu_hap_pt_share) ?
LIBXL_PASSTHROUGH_SYNC_PT : LIBXL_PASSTHROUGH_SHARE_PT;
} else if (!info.cap_hvm_directio) {
} else if (!info->cap_hvm_directio) {
c_info->passthrough = LIBXL_PASSTHROUGH_DISABLED;
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.