Re: [PATCH] vsh: Using vshError rather than virReportError

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Oct 18, 2016 at 07:39:16 -0400, Kothapally Madhu Pavan wrote:
> Correcting the error reporting method by using vshError
> instead of virReportError
> 
> Signed-off-by: Kothapally Madhu Pavan <kmp@xxxxxxxxxxxxxxxxxx>
> ---
>  tools/virsh-domain.c |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
> index 050e7fb..c9fabf2 100644
> --- a/tools/virsh-domain.c
> +++ b/tools/virsh-domain.c
> @@ -10475,9 +10475,9 @@ cmdMigrate(vshControl *ctl, const vshCmd *cmd)
>  
>      if (vshCommandOptBool(cmd, "postcopy-after-precopy")) {
>          if (!vshCommandOptBool(cmd, "postcopy")) {
> -            virReportError(VIR_ERR_ARGUMENT_UNSUPPORTED, "%s",
> -                          _("--postcopy-after-precopy can only be used with "
> -                            "--postcopy"));
> +            vshError(ctl, "%s",
> +                     _("argument unsupported: --postcopy-after-precopy can only "
> +                       "be used with --postcopy"));
>              goto cleanup;

I think the above code can be avoided by simply using
VSH_REQUIRE_OPTION.

Attachment: signature.asc
Description: Digital signature

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]