[PATCH] virsh: cmdUndefine: Properly extract delete-storage-volume-snapshots flag

Peter Krempa posted 1 patch 4 years, 1 month ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/631572a49ed5e459a54ab16aeca47a608f88c5a6.1586439207.git.pkrempa@redhat.com
tools/virsh-domain.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] virsh: cmdUndefine: Properly extract delete-storage-volume-snapshots flag
Posted by Peter Krempa 4 years, 1 month ago
Commit 86608f787ee added the above flag as an alias for ambiguous
'delete-snapshots' flag, but forgot to actually change the code that
extracts it, thus the new version actually doesn't work.

https://bugzilla.redhat.com/show_bug.cgi?id=1821988

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
---
 tools/virsh-domain.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 2dc7c38b55..a203b34996 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -3658,7 +3658,7 @@ cmdUndefine(vshControl *ctl, const vshCmd *cmd)
     bool checkpoints_metadata = vshCommandOptBool(cmd, "checkpoints-metadata");
     bool wipe_storage = vshCommandOptBool(cmd, "wipe-storage");
     bool remove_all_storage = vshCommandOptBool(cmd, "remove-all-storage");
-    bool delete_snapshots = vshCommandOptBool(cmd, "delete-snapshots");
+    bool delete_snapshots = vshCommandOptBool(cmd, "delete-storage-volume-snapshots");
     bool nvram = vshCommandOptBool(cmd, "nvram");
     bool keep_nvram = vshCommandOptBool(cmd, "keep-nvram");
     /* Positive if these items exist.  */
-- 
2.26.0

Re: [PATCH] virsh: cmdUndefine: Properly extract delete-storage-volume-snapshots flag
Posted by Ján Tomko 4 years, 1 month ago
On a Thursday in 2020, Peter Krempa wrote:
>Commit 86608f787ee added the above flag as an alias for ambiguous
>'delete-snapshots' flag, but forgot to actually change the code that

there's another occurrence in VSH_REQUIRE_OPTION below

>extracts it, thus the new version actually doesn't work.
>
>https://bugzilla.redhat.com/show_bug.cgi?id=1821988
>
>Signed-off-by: Peter Krempa <pkrempa@redhat.com>
>---
> tools/virsh-domain.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano