aboutsummaryrefslogtreecommitdiff
path: root/hw/usb/u2f-passthru.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/usb/u2f-passthru.c')
-rw-r--r--hw/usb/u2f-passthru.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/hw/usb/u2f-passthru.c b/hw/usb/u2f-passthru.c
index b7025d3..fa8d9cd 100644
--- a/hw/usb/u2f-passthru.c
+++ b/hw/usb/u2f-passthru.c
@@ -482,10 +482,8 @@ static void u2f_passthru_realize(U2FKeyState *base, Error **errp)
return;
#endif
} else {
- fd = qemu_open_old(key->hidraw, O_RDWR);
+ fd = qemu_open(key->hidraw, O_RDWR, errp);
if (fd < 0) {
- error_setg(errp, "%s: Failed to open %s", TYPE_U2F_PASSTHRU,
- key->hidraw);
return;
}
@@ -518,12 +516,11 @@ static const VMStateDescription u2f_passthru_vmstate = {
}
};
-static Property u2f_passthru_properties[] = {
+static const Property u2f_passthru_properties[] = {
DEFINE_PROP_STRING("hidraw", U2FPassthruState, hidraw),
- DEFINE_PROP_END_OF_LIST(),
};
-static void u2f_passthru_class_init(ObjectClass *klass, void *data)
+static void u2f_passthru_class_init(ObjectClass *klass, const void *data)
{
DeviceClass *dc = DEVICE_CLASS(klass);
U2FKeyClass *kc = U2F_KEY_CLASS(klass);