summaryrefslogtreecommitdiff
path: root/usbclerk.cpp
diff options
context:
space:
mode:
authorArnon Gilboa <agilboa@redhat.com>2012-05-03 17:25:16 +0300
committerArnon Gilboa <agilboa@redhat.com>2012-05-03 17:25:16 +0300
commit2375431b67bae4f29ed4084f657ba4de1500ad15 (patch)
treed44ec03ea640ced294ec608a78fb92a18d04e547 /usbclerk.cpp
parent4fb26b94fd2f363154bb943d899f3c25bd1c25d5 (diff)
usbclerk: better msg names
Diffstat (limited to 'usbclerk.cpp')
-rw-r--r--usbclerk.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/usbclerk.cpp b/usbclerk.cpp
index 22e383d..a14245e 100644
--- a/usbclerk.cpp
+++ b/usbclerk.cpp
@@ -253,9 +253,9 @@ bool USBClerk::execute()
{
SECURITY_ATTRIBUTES sec_attr;
SECURITY_DESCRIPTOR* sec_desr;
- USBClerkDevInfo dev;
- USBClerkAck ack = {{USB_CLERK_MAGIC, USB_CLERK_VERSION,
- USB_CLERK_ACK, sizeof(USBClerkAck)}};
+ USBClerkDriverInstall dev;
+ USBClerkReply reply = {{USB_CLERK_MAGIC, USB_CLERK_VERSION,
+ USB_CLERK_REPLY, sizeof(USBClerkReply)}};
DWORD bytes;
#if 0
@@ -287,19 +287,19 @@ bool USBClerk::execute()
vd_printf("ReadFile() failed: %d\n", GetLastError());
goto disconnect;
}
- if (dev.hdr.magic != USB_CLERK_MAGIC || dev.hdr.type != USB_CLERK_DEV_INFO ||
- dev.hdr.size != sizeof(USBClerkDevInfo)) {
+ if (dev.hdr.magic != USB_CLERK_MAGIC || dev.hdr.type != USB_CLERK_DRIVER_INSTALL ||
+ dev.hdr.size != sizeof(USBClerkDriverInstall)) {
vd_printf("Unknown message received, magic %u type %u size %u",
dev.hdr.magic, dev.hdr.type, dev.hdr.size);
goto disconnect;
}
vd_printf("Installing winusb driver for %04x:%04x", dev.vid, dev.pid);
- if (ack.ack = install_winusb_driver(dev.vid, dev.pid)) {
+ if (reply.status = install_winusb_driver(dev.vid, dev.pid)) {
vd_printf("winusb driver install succeed");
} else {
vd_printf("winusb driver install failed");
}
- if (!WriteFile(_pipe, &ack, sizeof(ack), &bytes, NULL)) {
+ if (!WriteFile(_pipe, &reply, sizeof(reply), &bytes, NULL)) {
vd_printf("WriteFile() failed: %d\n", GetLastError());
goto disconnect;
}