]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Don't update status on 0 message
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 20 Aug 2010 14:49:24 +0000 (16:49 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Fri, 20 Aug 2010 14:49:24 +0000 (16:49 +0200)
term/usb_keyboard.c

index 5fcb570b771b24db533301cdf12b7a4f1911ea33..62f5df352fc34ed58041427311e30d31c07225e0 100644 (file)
@@ -220,8 +220,7 @@ grub_usb_keyboard_checkkey (struct grub_term_input *term)
   err = grub_usb_bulk_read_extended (termdata->usbdev,
                                     termdata->endp->endp_addr, sizeof (data),
                                     (char *) data, 10, &actual);
-
-  if (err)
+  if (err || actual < 1)
     return -1;
 
   termdata->status = data[0];