mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
* src/virsh.c: use virNodeGetFreeMemory() for freecell without
argument * src/libvirt_sym.version: export virNodeGetFreeMemory() Daniel
This commit is contained in:
parent
ab0f561de6
commit
b5a3d4da61
@ -1,3 +1,9 @@
|
||||
Sun Sep 30 15:20:36 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* src/virsh.c: use virNodeGetFreeMemory() for freecell without
|
||||
argument
|
||||
* src/libvirt_sym.version: export virNodeGetFreeMemory()
|
||||
|
||||
Sun Sep 30 14:49:27 CEST 2007 Daniel Veillard <veillard@redhat.com>
|
||||
|
||||
* include/libvirt/libvirt.h include/libvirt/libvirt.h.in
|
||||
|
@ -59,6 +59,7 @@
|
||||
virNodeGetInfo;
|
||||
virConnectGetCapabilities;
|
||||
virNodeGetCellsFreeMemory;
|
||||
virNodeGetFreeMemory;
|
||||
|
||||
virDomainSetVcpus;
|
||||
virDomainPinVcpu;
|
||||
|
10
src/virsh.c
10
src/virsh.c
@ -1588,13 +1588,13 @@ cmdFreecell(vshControl * ctl, vshCmd * cmd)
|
||||
|
||||
cell = vshCommandOptInt(cmd, "cellno", &cell_given);
|
||||
if (!cell_given) {
|
||||
cell = -1;
|
||||
memory = virNodeGetFreeMemory(ctl->conn);
|
||||
} else {
|
||||
ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
|
||||
if (ret != 1)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
ret = virNodeGetCellsFreeMemory(ctl->conn, &memory, cell, 1);
|
||||
if (ret != 1)
|
||||
return FALSE;
|
||||
|
||||
if (cell == -1)
|
||||
vshPrint(ctl, "%s: %llu kB\n", _("Total"), memory);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user