[libvirt PATCH] virIdentityEnsureSystemToken: Fix error message

Tim Wiederhake posted 1 patch 2 years, 9 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20210720150420.18399-1-twiederh@redhat.com
src/util/viridentity.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[libvirt PATCH] virIdentityEnsureSystemToken: Fix error message
Posted by Tim Wiederhake 2 years, 9 months ago
This appears to be a copy-paste mistake from the check directly above.

Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
---
 src/util/viridentity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/util/viridentity.c b/src/util/viridentity.c
index eb77f69e2e..c18326c8cb 100644
--- a/src/util/viridentity.c
+++ b/src/util/viridentity.c
@@ -284,7 +284,7 @@ virIdentityEnsureSystemToken(void)
     } else {
         if (virFileReadLimFD(fd, TOKEN_STRLEN, &token) < 0) {
             virReportSystemError(errno,
-                                 _("Failed to write system token '%s'"),
+                                 _("Failed to read system token '%s'"),
                                  tokenfile);
             return NULL;
         }
-- 
2.31.1

Re: [libvirt PATCH] virIdentityEnsureSystemToken: Fix error message
Posted by Daniel P. Berrangé 2 years, 9 months ago
On Tue, Jul 20, 2021 at 05:04:20PM +0200, Tim Wiederhake wrote:
> This appears to be a copy-paste mistake from the check directly above.
> 
> Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
> ---
>  src/util/viridentity.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/util/viridentity.c b/src/util/viridentity.c
> index eb77f69e2e..c18326c8cb 100644
> --- a/src/util/viridentity.c
> +++ b/src/util/viridentity.c
> @@ -284,7 +284,7 @@ virIdentityEnsureSystemToken(void)
>      } else {
>          if (virFileReadLimFD(fd, TOKEN_STRLEN, &token) < 0) {
>              virReportSystemError(errno,
> -                                 _("Failed to write system token '%s'"),
> +                                 _("Failed to read system token '%s'"),
>                                   tokenfile);
>              return NULL;
>          }

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [libvirt PATCH] virIdentityEnsureSystemToken: Fix error message
Posted by Jano Tomko 2 years, 9 months ago
On a %A in %Y, Tim Wiederhake wrote:
> This appears to be a copy-paste mistake from the check directly above.
> 
> Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
> ---
>  src/util/viridentity.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 

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

Jano