+Wed Sep 3 14:37:06 CEST 2008 Daniel Veillard <veillard@redhat.com>
+
+ * src/virsh.c: patch from Cole Robinson to add output on attach
+ and detach success
+
Wed Sep 3 14:23:48 CEST 2008 Daniel Veillard <veillard@redhat.com>
* AUTHORS: add Cole Robinson as commiter
vshError(ctl, FALSE, _("Failed to attach device from %s"), from);
virDomainFree(dom);
return FALSE;
+ } else {
+ vshPrint(ctl, _("Device attached successfully\n"));
}
virDomainFree(dom);
vshError(ctl, FALSE, _("Failed to detach device from %s"), from);
virDomainFree(dom);
return FALSE;
+ } else {
+ vshPrint(ctl, _("Device detached successfully\n"));
}
virDomainFree(dom);
if (!buf) goto cleanup;
strcat(buf, " </interface>\n");
- if (virDomainAttachDevice(dom, buf))
+ if (virDomainAttachDevice(dom, buf)) {
goto cleanup;
+ } else {
+ vshPrint(ctl, _("Interface attached successfully\n"));
+ }
ret = TRUE;
ret = virDomainDetachDevice(dom, (char *)xmlBufferContent(xml_buf));
if (ret != 0)
ret = FALSE;
- else
+ else {
+ vshPrint(ctl, _("Interface detached successfully\n"));
ret = TRUE;
+ }
cleanup:
if (dom)
if (virDomainAttachDevice(dom, buf))
goto cleanup;
+ else
+ vshPrint(ctl, _("Disk attached successfully\n"));
ret = TRUE;
ret = virDomainDetachDevice(dom, (char *)xmlBufferContent(xml_buf));
if (ret != 0)
ret = FALSE;
- else
+ else {
+ vshPrint(ctl, _("Disk detached successfully\n"));
ret = TRUE;
+ }
cleanup:
xmlXPathFreeObject(obj);