提交 b5a3d4da 编写于 作者: D Daniel Veillard

* src/virsh.c: use virNodeGetFreeMemory() for freecell without

  argument
* src/libvirt_sym.version: export virNodeGetFreeMemory()
Daniel
上级 ab0f561d
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;
......
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册