Re: [libvirt] [PATCH] conf: Fix type for @liveStatus in virDomainObjListLoadAllConfigs

2017-11-08 Thread Jiri Denemark
On Wed, Nov 08, 2017 at 15:18:37 +0100, Peter Krempa wrote:
> Use bool instead of an int.
> ---
>  src/bhyve/bhyve_driver.c| 4 ++--
>  src/conf/virdomainobjlist.c | 2 +-
>  src/conf/virdomainobjlist.h | 2 +-
>  src/libxl/libxl_driver.c| 6 +++---
>  src/lxc/lxc_driver.c| 6 +++---
>  src/qemu/qemu_driver.c  | 6 +++---
>  src/uml/uml_driver.c| 4 ++--
>  7 files changed, 15 insertions(+), 15 deletions(-)

Reviewed-by: Jiri Denemark 

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [PATCH] conf: Fix type for @liveStatus in virDomainObjListLoadAllConfigs

2017-11-08 Thread Peter Krempa
Use bool instead of an int.
---
 src/bhyve/bhyve_driver.c| 4 ++--
 src/conf/virdomainobjlist.c | 2 +-
 src/conf/virdomainobjlist.h | 2 +-
 src/libxl/libxl_driver.c| 6 +++---
 src/lxc/lxc_driver.c| 6 +++---
 src/qemu/qemu_driver.c  | 6 +++---
 src/uml/uml_driver.c| 4 ++--
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 5c432b25e..dd6e8abc6 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -1294,7 +1294,7 @@ bhyveStateInitialize(bool privileged,

 if (virDomainObjListLoadAllConfigs(bhyve_driver->domains,
BHYVE_STATE_DIR,
-   NULL, 1,
+   NULL, true,
bhyve_driver->caps,
bhyve_driver->xmlopt,
NULL, NULL) < 0)
@@ -1302,7 +1302,7 @@ bhyveStateInitialize(bool privileged,

 if (virDomainObjListLoadAllConfigs(bhyve_driver->domains,
BHYVE_CONFIG_DIR,
-   BHYVE_AUTOSTART_DIR, 0,
+   BHYVE_AUTOSTART_DIR, false,
bhyve_driver->caps,
bhyve_driver->xmlopt,
NULL, NULL) < 0)
diff --git a/src/conf/virdomainobjlist.c b/src/conf/virdomainobjlist.c
index b9f78c572..87a742b1e 100644
--- a/src/conf/virdomainobjlist.c
+++ b/src/conf/virdomainobjlist.c
@@ -559,7 +559,7 @@ int
 virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
const char *configDir,
const char *autostartDir,
-   int liveStatus,
+   bool liveStatus,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
virDomainLoadConfigNotify notify,
diff --git a/src/conf/virdomainobjlist.h b/src/conf/virdomainobjlist.h
index 60220ca0d..bb186bde3 100644
--- a/src/conf/virdomainobjlist.h
+++ b/src/conf/virdomainobjlist.h
@@ -72,7 +72,7 @@ void virDomainObjListRemoveLocked(virDomainObjListPtr doms,
 int virDomainObjListLoadAllConfigs(virDomainObjListPtr doms,
const char *configDir,
const char *autostartDir,
-   int liveStatus,
+   bool liveStatus,
virCapsPtr caps,
virDomainXMLOptionPtr xmlopt,
virDomainLoadConfigNotify notify,
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 951937f14..40328a6cb 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -763,7 +763,7 @@ libxlStateInitialize(bool privileged,
 if (virDomainObjListLoadAllConfigs(libxl_driver->domains,
cfg->stateDir,
cfg->autostartDir,
-   1,
+   true,
cfg->caps,
libxl_driver->xmlopt,
NULL, NULL) < 0)
@@ -775,7 +775,7 @@ libxlStateInitialize(bool privileged,
 if (virDomainObjListLoadAllConfigs(libxl_driver->domains,
cfg->configDir,
cfg->autostartDir,
-   0,
+   false,
cfg->caps,
libxl_driver->xmlopt,
NULL, NULL) < 0)
@@ -815,7 +815,7 @@ libxlStateReload(void)
 virDomainObjListLoadAllConfigs(libxl_driver->domains,
cfg->configDir,
cfg->autostartDir,
-   1,
+   true,
cfg->caps,
libxl_driver->xmlopt,
NULL, libxl_driver);
diff --git a/src/lxc/lxc_driver.c b/src/lxc/lxc_driver.c
index 0069e5e92..b3447100f 100644
--- a/src/lxc/lxc_driver.c
+++ b/src/lxc/lxc_driver.c
@@ -1679,7 +1679,7 @@ static int lxcStateInitialize(bool privileged,
 /* Get all the running persistent or transient configs first */
 if (virDomainObjListLoadAllConfigs(lxc_driver->domains,
cfg->stateDir,
-   NULL, 1,
+   NULL, true,
caps,