
On 23.01.2012 14:30, Jiri Denemark wrote:
--- tools/virsh.c | 111 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ tools/virsh.pod | 11 +++++ 2 files changed, 122 insertions(+), 0 deletions(-)
diff --git a/tools/virsh.c b/tools/virsh.c index d635b56..92029fd 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -15809,6 +15809,116 @@ cleanup: }
/* + * "domioerror" command + */ +static const char * +vshDomainIOErrorToString(int error) +{ + switch ((virDomainIoError) error) {
I like this typecast as once we add something to virDomainIoError but forget to add it here, gcc will complain.
+ case VIR_DOMAIN_IOERROR_NONE: + return _("no error"); + case VIR_DOMAIN_IOERROR_NO_SPACE: + return _("no space"); + case VIR_DOMAIN_IOERROR_UNSPEC: + return _("unspecified error"); + case VIR_DOMAIN_IOERROR_LAST: + ; + } + + return _("unknown error"); +} +
Overall, looking good, but see my comment to 1/4. You may need to change this a bit then. ACK Michal