mirror of https://gitee.com/openkylin/libvirt.git
virsh: domain: remove nested 'if' in cmdAttachDisk()
Signed-off-by: Kristina Hanicova <khanicov@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
14a804ee67
commit
a1fe822801
|
@ -659,12 +659,9 @@ cmdAttachDisk(vshControl *ctl, const vshCmd *cmd)
|
|||
return false;
|
||||
}
|
||||
|
||||
if (mode) {
|
||||
if (STRNEQ(mode, "readonly") && STRNEQ(mode, "shareable")) {
|
||||
vshError(ctl, _("No support for %s in command 'attach-disk'"),
|
||||
mode);
|
||||
return false;
|
||||
}
|
||||
if (mode && STRNEQ(mode, "readonly") && STRNEQ(mode, "shareable")) {
|
||||
vshError(ctl, _("No support for %s in command 'attach-disk'"), mode);
|
||||
return false;
|
||||
}
|
||||
|
||||
if (wwn && !virValidateWWN(wwn))
|
||||
|
|
Loading…
Reference in New Issue