mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
virsh: Move error messages inside vshCommandOpt*() functions
This commit is contained in:
committed by
John Ferlan
parent
be6ff4da95
commit
815dc963ee
@@ -340,12 +340,8 @@ cmdDomMemStat(vshControl *ctl, const vshCmd *cmd)
|
||||
/* Providing a period will adjust the balloon driver collection period.
|
||||
* This is not really an unsigned long, but it
|
||||
*/
|
||||
if ((rv = vshCommandOptInt(ctl, cmd, "period", &period)) < 0) {
|
||||
vshError(ctl,
|
||||
_("Numeric value for <%s> option is malformed or out of range"),
|
||||
"period");
|
||||
if ((rv = vshCommandOptInt(ctl, cmd, "period", &period)) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
if (rv > 0) {
|
||||
if (period < 0) {
|
||||
vshError(ctl, _("Invalid collection period value '%d'"), period);
|
||||
@@ -1440,9 +1436,6 @@ cmdDomTime(vshControl *ctl, const vshCmd *cmd)
|
||||
|
||||
if (rv < 0) {
|
||||
/* invalid integer format */
|
||||
vshError(ctl,
|
||||
_("Numeric value for <%s> option is malformed or out of range"),
|
||||
"time");
|
||||
goto cleanup;
|
||||
} else if (rv > 0) {
|
||||
/* valid integer to set */
|
||||
|
||||
Reference in New Issue
Block a user