[libvirt] [PATCH] access: fix incorrect addition to virAccessPermNetwork

Laine Stump posted 1 patch 4 years, 8 months ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20190815204220.21995-1-laine@redhat.com
src/access/viraccessperm.h | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
[libvirt] [PATCH] access: fix incorrect addition to virAccessPermNetwork
Posted by Laine Stump 4 years, 8 months ago
Commit e69444e17 (first appeared in libvirt-5.5.0) added the new value
"VIR_ACCESS_PERM_NETWORK_SEARCH_PORTS" to the virAccessPerNetwork
enum, and also the string "search_ports" to the VIR_ENUM_IMPL() macro
for that enum. Unfortunately, the enum value was added in the middle
of the list, while the string was added to the end of the
VIR_ENUM_IMPL().

This patch corrects that error by moving the new value to the end of
the enum definition, so that the order matches that of the string
list.

Resolves: https://bugzilla.redhat.com/1741428
Signed-off-by: Laine Stump <laine@redhat.com>
---
 src/access/viraccessperm.h | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/access/viraccessperm.h b/src/access/viraccessperm.h
index a42512d5e0..7480ee8c2f 100644
--- a/src/access/viraccessperm.h
+++ b/src/access/viraccessperm.h
@@ -410,18 +410,18 @@ typedef enum {
      */
     VIR_ACCESS_PERM_NETWORK_START,
 
-    /**
-     * @desc: List network ports
-     * @message: Listing network ports requires authorization
-     */
-    VIR_ACCESS_PERM_NETWORK_SEARCH_PORTS,
-
     /**
      * @desc: Stop network
      * @message: Stopping network requires authorization
      */
     VIR_ACCESS_PERM_NETWORK_STOP,
 
+    /**
+     * @desc: List network ports
+     * @message: Listing network ports requires authorization
+     */
+    VIR_ACCESS_PERM_NETWORK_SEARCH_PORTS,
+
     VIR_ACCESS_PERM_NETWORK_LAST
 } virAccessPermNetwork;
 
-- 
2.21.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] access: fix incorrect addition to virAccessPermNetwork
Posted by Michal Privoznik 4 years, 8 months ago
On 8/15/19 10:42 PM, Laine Stump wrote:
> Commit e69444e17 (first appeared in libvirt-5.5.0) added the new value
> "VIR_ACCESS_PERM_NETWORK_SEARCH_PORTS" to the virAccessPerNetwork
> enum, and also the string "search_ports" to the VIR_ENUM_IMPL() macro
> for that enum. Unfortunately, the enum value was added in the middle
> of the list, while the string was added to the end of the
> VIR_ENUM_IMPL().
> 
> This patch corrects that error by moving the new value to the end of
> the enum definition, so that the order matches that of the string
> list.
> 
> Resolves: https://bugzilla.redhat.com/1741428
> Signed-off-by: Laine Stump <laine@redhat.com>
> ---
>   src/access/viraccessperm.h | 12 ++++++------
>   1 file changed, 6 insertions(+), 6 deletions(-)
> 

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>

Michal

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