aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tools/virsh-pool.c')
-rw-r--r--tools/virsh-pool.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/tools/virsh-pool.c b/tools/virsh-pool.c
index d9cba4ef9..fd239d2a9 100644
--- a/tools/virsh-pool.c
+++ b/tools/virsh-pool.c
@@ -96,9 +96,6 @@ cmdPoolAutostart(vshControl *ctl, const vshCmd *cmd)
const char *name;
int autostart;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", &name)))
return false;
@@ -145,9 +142,6 @@ cmdPoolCreate(vshControl *ctl, const vshCmd *cmd)
bool ret = true;
char *buffer;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (vshCommandOptString(cmd, "file", &from) <= 0)
return false;
@@ -261,9 +255,6 @@ cmdPoolCreateAs(vshControl *ctl, const vshCmd *cmd)
char *xml;
bool printXML = vshCommandOptBool(cmd, "print-xml");
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!buildPoolXML(cmd, &name, &xml))
return false;
@@ -307,9 +298,6 @@ cmdPoolDefine(vshControl *ctl, const vshCmd *cmd)
bool ret = true;
char *buffer;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (vshCommandOptString(cmd, "file", &from) <= 0)
return false;
@@ -347,9 +335,6 @@ cmdPoolDefineAs(vshControl *ctl, const vshCmd *cmd)
char *xml;
bool printXML = vshCommandOptBool(cmd, "print-xml");
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!buildPoolXML(cmd, &name, &xml))
return false;
@@ -395,9 +380,6 @@ cmdPoolBuild(vshControl *ctl, const vshCmd *cmd)
const char *name;
unsigned int flags = 0;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", &name)))
return false;
@@ -443,9 +425,6 @@ cmdPoolDestroy(vshControl *ctl, const vshCmd *cmd)
bool ret = true;
const char *name;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", &name)))
return false;
@@ -481,9 +460,6 @@ cmdPoolDelete(vshControl *ctl, const vshCmd *cmd)
bool ret = true;
const char *name;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", &name)))
return false;
@@ -519,9 +495,6 @@ cmdPoolRefresh(vshControl *ctl, const vshCmd *cmd)
bool ret = true;
const char *name;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", &name)))
return false;
@@ -563,9 +536,6 @@ cmdPoolDumpXML(vshControl *ctl, const vshCmd *cmd)
if (inactive)
flags |= VIR_STORAGE_XML_INACTIVE;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", NULL)))
return false;
@@ -626,10 +596,6 @@ cmdPoolList(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
bool active = !inactive || all;
inactive |= all;
- /* Check the connection to libvirtd daemon is still working */
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
/* Retrieve the number of active storage pools */
if (active) {
numActivePools = virConnectNumOfStoragePools(ctl->conn);
@@ -1024,9 +990,6 @@ cmdPoolDiscoverSourcesAs(vshControl * ctl, const vshCmd * cmd ATTRIBUTE_UNUSED)
return false;
}
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (host) {
const char *port = NULL;
virBuffer buf = VIR_BUFFER_INITIALIZER;
@@ -1097,9 +1060,6 @@ cmdPoolDiscoverSources(vshControl * ctl, const vshCmd * cmd ATTRIBUTE_UNUSED)
return false;
}
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (srcSpecFile && virFileReadAll(srcSpecFile, VSH_MAX_XML_FILE,
&srcSpec) < 0)
return false;
@@ -1140,9 +1100,6 @@ cmdPoolInfo(vshControl *ctl, const vshCmd *cmd)
bool ret = true;
char uuid[VIR_UUID_STRING_BUFLEN];
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", NULL)))
return false;
@@ -1233,8 +1190,6 @@ cmdPoolName(vshControl *ctl, const vshCmd *cmd)
{
virStoragePoolPtr pool;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
if (!(pool = vshCommandOptPoolBy(ctl, cmd, "pool", NULL,
VSH_BYUUID)))
return false;
@@ -1265,9 +1220,6 @@ cmdPoolStart(vshControl *ctl, const vshCmd *cmd)
bool ret = true;
const char *name = NULL;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", &name)))
return false;
@@ -1303,9 +1255,6 @@ cmdPoolUndefine(vshControl *ctl, const vshCmd *cmd)
bool ret = true;
const char *name;
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPool(ctl, cmd, "pool", &name)))
return false;
@@ -1340,9 +1289,6 @@ cmdPoolUuid(vshControl *ctl, const vshCmd *cmd)
virStoragePoolPtr pool;
char uuid[VIR_UUID_STRING_BUFLEN];
- if (!vshConnectionUsability(ctl, ctl->conn))
- return false;
-
if (!(pool = vshCommandOptPoolBy(ctl, cmd, "pool", NULL,
VSH_BYNAME)))
return false;
@@ -1379,9 +1325,6 @@ cmdPoolEdit(vshControl *ctl, const vshCmd *cmd)
unsigned int flags = VIR_STORAGE_XML_INACTIVE;
char *tmp_desc = NULL;
- if (!vshConnectionUsability(ctl, ctl->conn))
- goto cleanup;
-
pool = vshCommandOptPool(ctl, cmd, "pool", NULL);
if (pool == NULL)
goto cleanup;