[PATCH] usb: fix u2f build

Gerd Hoffmann posted 1 patch 3 years, 7 months ago
Test docker-quick@centos7 failed
Test docker-mingw@fedora failed
Test checkpatch failed
Test FreeBSD failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200918110122.9121-1-kraxel@redhat.com
hw/usb/u2f-emulated.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
[PATCH] usb: fix u2f build
Posted by Gerd Hoffmann 3 years, 7 months ago
Just use qemu_open_old() for a quick fix, switch
to better error handling left for another day.

Fixes: 448058aa99aa ("util: rename qemu_open() to qemu_open_old()")
Cc: César Belley <cesar.belley@lse.epita.fr>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/usb/u2f-emulated.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/hw/usb/u2f-emulated.c b/hw/usb/u2f-emulated.c
index 9e1b829f3d32..9151feb63d44 100644
--- a/hw/usb/u2f-emulated.c
+++ b/hw/usb/u2f-emulated.c
@@ -200,7 +200,7 @@ static ssize_t u2f_emulated_read(const char *path, char *buffer,
     int fd;
     ssize_t ret;
 
-    fd = qemu_open(path, O_RDONLY);
+    fd = qemu_open_old(path, O_RDONLY);
     if (fd < 0) {
         return -1;
     }
@@ -217,7 +217,7 @@ static bool u2f_emulated_setup_counter(const char *path,
     int fd, ret;
     FILE *fp;
 
-    fd = qemu_open(path, O_RDWR);
+    fd = qemu_open_old(path, O_RDWR);
     if (fd < 0) {
         return false;
     }
-- 
2.27.0


Re: [PATCH] usb: fix u2f build
Posted by Daniel P. Berrangé 3 years, 7 months ago
On Fri, Sep 18, 2020 at 01:01:22PM +0200, Gerd Hoffmann wrote:
> Just use qemu_open_old() for a quick fix, switch
> to better error handling left for another day.
> 
> Fixes: 448058aa99aa ("util: rename qemu_open() to qemu_open_old()")
> Cc: César Belley <cesar.belley@lse.epita.fr>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
>  hw/usb/u2f-emulated.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

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: [PATCH] usb: fix u2f build
Posted by Daniel P. Berrangé 3 years, 7 months ago
On Fri, Sep 18, 2020 at 12:03:12PM +0100, Daniel P. Berrangé wrote:
> On Fri, Sep 18, 2020 at 01:01:22PM +0200, Gerd Hoffmann wrote:
> > Just use qemu_open_old() for a quick fix, switch
> > to better error handling left for another day.
> > 
> > Fixes: 448058aa99aa ("util: rename qemu_open() to qemu_open_old()")
> > Cc: César Belley <cesar.belley@lse.epita.fr>
> > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> > ---
> >  hw/usb/u2f-emulated.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>

BTW, this breakage shows that we're missing CI coverage for this
feature. the pre-requisite library needs to be added to any of the
dockerfiles where it is available and ensure its covered by at least
one of the gitlab CI jobs that exists.

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 :|