[libvirt] [PATCH] virresctrl: remove bogus virResetLastError

Ján Tomko posted 1 patch 5 years, 6 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/a601eac5ed6a4066585e19f6cc100cd9b7987ec1.1538750523.git.jtomko@redhat.com
Test syntax-check passed
src/util/virresctrl.c | 2 --
1 file changed, 2 deletions(-)
[libvirt] [PATCH] virresctrl: remove bogus virResetLastError
Posted by Ján Tomko 5 years, 6 months ago
virFileReadValueUint does not log errors for non-existient files,
it merely returns -2.

Commit 12093f1 introduced this.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
---
 src/util/virresctrl.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/util/virresctrl.c b/src/util/virresctrl.c
index fb25ca84f0..df5b5124e6 100644
--- a/src/util/virresctrl.c
+++ b/src/util/virresctrl.c
@@ -638,7 +638,6 @@ virResctrlGetMonitorInfo(virResctrlInfoPtr resctrl)
         VIR_INFO("The file '" SYSFS_RESCTRL_PATH "/info/L3_MON/num_rmids' "
                  "does not exist");
         ret = 0;
-        virResetLastError();
         goto cleanup;
     } else if (rv < 0) {
         /* Other failures are fatal, so just quit */
@@ -653,7 +652,6 @@ virResctrlGetMonitorInfo(virResctrlInfoPtr resctrl)
          * will not exist. */
         VIR_DEBUG("File '" SYSFS_RESCTRL_PATH
                   "/info/L3_MON/max_threshold_occupancy' does not exist");
-        virResetLastError();
     } else if (rv < 0) {
         goto cleanup;
     }
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] virresctrl: remove bogus virResetLastError
Posted by Michal Privoznik 5 years, 6 months ago
On 10/05/2018 04:42 PM, Ján Tomko wrote:
> virFileReadValueUint does not log errors for non-existient files,
> it merely returns -2.
> 
> Commit 12093f1 introduced this.
> 
> Signed-off-by: Ján Tomko <jtomko@redhat.com>
> ---
>  src/util/virresctrl.c | 2 --
>  1 file changed, 2 deletions(-)
> 


ACK

Michal

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