+Mon Jan 23 12:28:42 IST 2007 Mark McLoughlin <markmc@redhat.com>
+
+ Issues pointed out by Karel Zak <kzak@redhat.com>
+
+ * src/virsh.c: fix up some syntax strings, use BUFSIZ
+ and free names returned from virConnectListDefinedDomains()
+
Mon Jan 22 15:41:52 EST 2007 Daniel Berrange <berrange@redhat.com>
* src/virsh.c: Fix crash in 'connect' command by ensuring
* "list" command
*/
static vshCmdInfo info_list[] = {
- {"syntax", "list"},
+ {"syntax", "list [--inactive | --all]"},
{"help", gettext_noop("list domains")},
{"desc", gettext_noop("Returns list of domains.")},
{NULL, NULL}
virDomainPtr dom = virDomainLookupByName(ctl->conn, names[i]);
/* this kind of work with domains is not atomic operation */
- if (!dom)
+ if (!dom) {
+ free(names[i]);
continue;
+ }
ret = virDomainGetInfo(dom, &info);
id = virDomainGetID(dom);
}
virDomainFree(dom);
+ free(names[i]);
}
if (ids)
free(ids);
char *from;
int found;
int ret = TRUE;
- char buffer[4096];
+ char buffer[BUFSIZ];
int fd, l;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
char *from;
int found;
int ret = TRUE;
- char buffer[4096];
+ char buffer[BUFSIZ];
int fd, l;
if (!vshConnectionUsability(ctl, ctl->conn, TRUE))
* "start" command
*/
static vshCmdInfo info_start[] = {
- {"syntax", "start a domain "},
+ {"syntax", "start <domain>"},
{"help", gettext_noop("start a (previously defined) inactive domain")},
{"desc", gettext_noop("Start a domain.")},
{NULL, NULL}