On 05/26/2011 04:31 AM, Daniel P. Berrange wrote:
On Thu, May 19, 2011 at 04:51:27PM -0400, Laine Stump wrote:
From: Michal Privoznik<mpriv...@redhat.com>

This implements the commands iface-begin, iface-commit, and iface-rollback,
which simply call the corresponding functions in the libvirt API.
---
  tools/virsh.c |  103 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  1 files changed, 103 insertions(+), 0 deletions(-)

diff --git a/tools/virsh.c b/tools/virsh.c
index c2f4de6..6d72c75 100644
--- a/tools/virsh.c
+++ b/tools/virsh.c


The code patterns in these methods are rather different from the
normal practice used in virsh. Also 'end:' is also not following
the hacking guidelines for naming conventions. These methods
should be updated to follow the normal coding pattern. eg as
per the cmdCapabilities() method style

    static bool
    cmdInterfaceRollback(vshControl *ctl, const vshCmd *cmd ATTRIBUTE_UNUSED)
    {
        if (!vshConnectionUsability(ctl, ctl->conn))
            return false;

        if (virInterfaceChangeRollback(ctl->conn, 0)<  0) {
            vshError(ctl, "%s", _("Failed to rollback network config change 
transaction"));
            return false;
        }

        vshPrint(ctl, "%s", _("Network config change transaction rolled 
back\n"));
        return true;
    }


Taken care of in the next version.

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to