mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 15:15:25 +00:00
Adding Storage Management driver (style and indentation)
This is just the indentation, style and cleanup patch.
This commit is contained in:
parent
e214bcf37c
commit
edfedfb414
@ -655,7 +655,8 @@ phypGetLparMem(virConnectPtr conn, const char *managed_system, int lpar_id,
|
|||||||
virBufferAddLit(&buf, "lshwres");
|
virBufferAddLit(&buf, "lshwres");
|
||||||
if (system_type == HMC)
|
if (system_type == HMC)
|
||||||
virBufferVSprintf(&buf, " -m %s", managed_system);
|
virBufferVSprintf(&buf, " -m %s", managed_system);
|
||||||
virBufferVSprintf(&buf, " -r mem --level lpar -F %s --filter lpar_ids=%d",
|
virBufferVSprintf(&buf,
|
||||||
|
" -r mem --level lpar -F %s --filter lpar_ids=%d",
|
||||||
type ? "curr_mem" : "curr_max_mem", lpar_id);
|
type ? "curr_mem" : "curr_max_mem", lpar_id);
|
||||||
if (virBufferError(&buf)) {
|
if (virBufferError(&buf)) {
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
@ -721,7 +722,8 @@ phypGetLparCPUGeneric(virConnectPtr conn, const char *managed_system,
|
|||||||
virBufferAddLit(&buf, "lshwres");
|
virBufferAddLit(&buf, "lshwres");
|
||||||
if (system_type == HMC)
|
if (system_type == HMC)
|
||||||
virBufferVSprintf(&buf, " -m %s", managed_system);
|
virBufferVSprintf(&buf, " -m %s", managed_system);
|
||||||
virBufferVSprintf(&buf, " -r proc --level lpar -F %s --filter lpar_ids=%d",
|
virBufferVSprintf(&buf,
|
||||||
|
" -r proc --level lpar -F %s --filter lpar_ids=%d",
|
||||||
type ? "curr_max_procs" : "curr_procs", lpar_id);
|
type ? "curr_max_procs" : "curr_procs", lpar_id);
|
||||||
if (virBufferError(&buf)) {
|
if (virBufferError(&buf)) {
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
@ -772,8 +774,7 @@ phypGetRemoteSlot(virConnectPtr conn, const char *managed_system,
|
|||||||
if (system_type == HMC)
|
if (system_type == HMC)
|
||||||
virBufferVSprintf(&buf, " -m %s", managed_system);
|
virBufferVSprintf(&buf, " -m %s", managed_system);
|
||||||
virBufferVSprintf(&buf, " -r virtualio --rsubtype scsi -F "
|
virBufferVSprintf(&buf, " -r virtualio --rsubtype scsi -F "
|
||||||
"remote_slot_num --filter lpar_names=%s",
|
"remote_slot_num --filter lpar_names=%s", lpar_name);
|
||||||
lpar_name);
|
|
||||||
if (virBufferError(&buf)) {
|
if (virBufferError(&buf)) {
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
@ -1066,7 +1067,8 @@ phypNumDomainsGeneric(virConnectPtr conn, unsigned int type)
|
|||||||
virBufferAddLit(&buf, "lssyscfg -r lpar");
|
virBufferAddLit(&buf, "lssyscfg -r lpar");
|
||||||
if (system_type == HMC)
|
if (system_type == HMC)
|
||||||
virBufferVSprintf(&buf, " -m %s", managed_system);
|
virBufferVSprintf(&buf, " -m %s", managed_system);
|
||||||
virBufferVSprintf(&buf, " -F lpar_id,state %s |grep -c '^[0-9]*'", state);
|
virBufferVSprintf(&buf, " -F lpar_id,state %s |grep -c '^[0-9]*'",
|
||||||
|
state);
|
||||||
if (virBufferError(&buf)) {
|
if (virBufferError(&buf)) {
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
@ -1140,7 +1142,8 @@ phypListDomainsGeneric(virConnectPtr conn, int *ids, int nids,
|
|||||||
virBufferAddLit(&buf, "lssyscfg -r lpar");
|
virBufferAddLit(&buf, "lssyscfg -r lpar");
|
||||||
if (system_type == HMC)
|
if (system_type == HMC)
|
||||||
virBufferVSprintf(&buf, " -m %s", managed_system);
|
virBufferVSprintf(&buf, " -m %s", managed_system);
|
||||||
virBufferVSprintf(&buf, " -F lpar_id,state %s | sed -e 's/,.*$//'", state);
|
virBufferVSprintf(&buf, " -F lpar_id,state %s | sed -e 's/,.*$//'",
|
||||||
|
state);
|
||||||
if (virBufferError(&buf)) {
|
if (virBufferError(&buf)) {
|
||||||
virBufferFreeAndReset(&buf);
|
virBufferFreeAndReset(&buf);
|
||||||
virReportOOMError();
|
virReportOOMError();
|
||||||
@ -2125,7 +2128,7 @@ phypUUIDTable_Push(virConnectPtr conn)
|
|||||||
/* end of file */
|
/* end of file */
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
VIR_ERROR(_("Failed to read from '%s'"), local_file);
|
VIR_ERROR(_("Failed to read from %s"), local_file);
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user