Add new error code to be able to allow consumers (such as Nova) to be
able to key of a specific error code rather than needing to search the
error message."
Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
VIR_ERR_AGENT_UNSYNCED = 97, /* guest agent replies with wrong id
to guest-sync command (DEPRECATED)*/
VIR_ERR_LIBSSH = 98, /* error in libssh transport driver */
+ VIR_ERR_DEVICE_MISSING = 99, /* fail to find the desired device */
} virErrorNumber;
/**
else
errmsg = _("libssh transport error: %s");
break;
+ case VIR_ERR_DEVICE_MISSING:
+ if (info == NULL)
+ errmsg = _("device not found");
+ else
+ errmsg = _("device not found: %s");
+ break;
}
return errmsg;
}