Re: [Xen-devel] [XEN PATCH for-4.13 v2 7/9] libxl: create: setdefault: Make libxl_physinfo info[1]

2019-10-11 Thread Wei Liu
On Thu, Oct 10, 2019 at 04:11:09PM +0100, Ian Jackson wrote:
> 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 


Acked-by: Wei Liu 

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [XEN PATCH for-4.13 v2 7/9] libxl: create: setdefault: Make libxl_physinfo info[1]

2019-10-10 Thread Ian Jackson
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 
---
v2: New patch in this version of the series.
---
 tools/libxl/libxl_create.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tools/libxl/libxl_create.c b/tools/libxl/libxl_create.c
index b394312d98..9c56a914ca 100644
--- a/tools/libxl/libxl_create.c
+++ b/tools/libxl/libxl_create.c
@@ -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, );
+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(_info->hap, true);
-else if (info.cap_shadow)
+} else if (info->cap_shadow) {
 libxl_defbool_setdefault(_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;
 }
 
-- 
2.11.0


___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel