mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-13 00:01:55 +00:00
Check for failure of virConnectListDomains in 'list' command
This commit is contained in:
parent
129a24ea8c
commit
0658b086cd
@ -1,4 +1,10 @@
|
||||
Thu Aug 18 15:22:23 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
Mon Aug 21 13:00:03 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/virsh.c: check return code of virConnectListDomains in case
|
||||
there was a failure, and stop the 'list' command immediately
|
||||
rather than continuing with bogus domain ID data.
|
||||
|
||||
Fri Aug 18 15:22:23 EDT 2006 Daniel Berrange <berrange@redhat.com>
|
||||
|
||||
* src/xml.c: fix networking in paravirt guests - only set the
|
||||
'(type ioemu)' option for HVM.
|
||||
|
@ -332,7 +332,10 @@ cmdList(vshControl * ctl, vshCmd * cmd ATTRIBUTE_UNUSED)
|
||||
}
|
||||
ids = vshMalloc(ctl, sizeof(int) * maxid);
|
||||
|
||||
virConnectListDomains(ctl->conn, &ids[0], maxid);
|
||||
if (virConnectListDomains(ctl->conn, &ids[0], maxid) < 0) {
|
||||
vshError(ctl, FALSE, "failed to list active domains.");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
vshPrintExtra(ctl, "%3s %-20s %s\n", "Id", "Name", "State");
|
||||
vshPrintExtra(ctl, "----------------------------------\n");
|
||||
|
Loading…
x
Reference in New Issue
Block a user