mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-02 04:15:46 +00:00
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,13 +659,10 @@ 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);
|
||||
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))
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user