int interval,
unsigned int count)
{
- int ret = -1;
-
VIR_DEBUG("conn=%p, interval=%d, count=%u", conn, interval, count);
virResetLastError();
virCheckConnectReturn(conn, -1);
if (conn->driver->connectSetKeepAlive) {
- ret = conn->driver->connectSetKeepAlive(conn, interval, count);
+ int ret = conn->driver->connectSetKeepAlive(conn, interval, count);
if (ret < 0)
goto error;
return ret;
g_autoptr(virNodeDeviceDef) def = NULL;
g_autofree char *wwnn = NULL;
g_autofree char *wwpn = NULL;
- int parent_host = -1;
virNodeDevicePtr device = NULL;
const char *virt_type = NULL;
return NULL;
if (nodeDeviceHasCapability(def, VIR_NODE_DEV_CAP_SCSI_HOST)) {
+ int parent_host;
+
if (virNodeDeviceGetWWNs(def, &wwnn, &wwpn) == -1)
return NULL;
virStorageBackendCreateVols(virStoragePoolObjPtr pool,
struct dm_names *names)
{
- int is_mpath = 0;
uint32_t minor = -1;
uint32_t next;
g_autofree char *map_device = NULL;
do {
- is_mpath = virStorageBackendIsMultipath(names->name);
+ int is_mpath = virStorageBackendIsMultipath(names->name);
if (is_mpath < 0)
return -1;
unsigned int flags)
{
char *target_path = vol->target.path;
- int has_snap = 0;
bool sparse = flags & VIR_STORAGE_VOL_UPLOAD_SPARSE_STREAM;
g_autofree char *path = NULL;
* when volUpload is fully finished. */
if (vol->target.format == VIR_STORAGE_FILE_PLOOP) {
/* Fail if the volume contains snapshots or we failed to check it.*/
- has_snap = storageBackendPloopHasSnapshots(vol->target.path);
+ int has_snap = storageBackendPloopHasSnapshots(vol->target.path);
if (has_snap < 0) {
return -1;
} else if (!has_snap) {
unsigned int flags)
{
char *target_path = vol->target.path;
- int has_snap = 0;
bool sparse = flags & VIR_STORAGE_VOL_DOWNLOAD_SPARSE_STREAM;
g_autofree char *path = NULL;
virCheckFlags(VIR_STORAGE_VOL_DOWNLOAD_SPARSE_STREAM, -1);
if (vol->target.format == VIR_STORAGE_FILE_PLOOP) {
- has_snap = storageBackendPloopHasSnapshots(vol->target.path);
+ int has_snap = storageBackendPloopHasSnapshots(vol->target.path);
if (has_snap < 0) {
return -1;
} else if (!has_snap) {
virStoragePoolInfo info;
virStoragePoolPtr pool;
int autostart = 0;
- int persistent = 0;
bool ret = true;
bool bytes = false;
char uuid[VIR_UUID_STRING_BUFLEN];
if (virStoragePoolGetInfo(pool, &info) == 0) {
double val;
const char *unit;
+ int persistent;
+
vshPrint(ctl, "%-15s %s\n", _("State:"),
virshStoragePoolStateToString(info.state));