Fix USB devices not being detected when requested
due to delayed attach.
This commit is contained in:
parent
e744219bb6
commit
d745dda77e
9 changed files with 48 additions and 15 deletions
|
@ -42,7 +42,7 @@ grub_getkeystatus (void)
|
|||
grub_term_input_t term;
|
||||
|
||||
if (grub_term_poll_usb)
|
||||
grub_term_poll_usb ();
|
||||
grub_term_poll_usb (0);
|
||||
|
||||
FOR_ACTIVE_TERM_INPUTS(term)
|
||||
{
|
||||
|
|
|
@ -108,9 +108,9 @@ handle_command (int argc, char **args, struct abstract_terminal **enabled,
|
|||
if (term)
|
||||
break;
|
||||
if (again)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("terminal `%s' isn't found"),
|
||||
args[i]);
|
||||
args[i]);
|
||||
for (aut = autoloads; aut; aut = aut->next)
|
||||
if (grub_strcmp (args[i], aut->name) == 0
|
||||
|| (grub_strcmp (args[i], "ofconsole") == 0
|
||||
|
@ -126,6 +126,14 @@ handle_command (int argc, char **args, struct abstract_terminal **enabled,
|
|||
grub_errno = GRUB_ERR_NONE;
|
||||
break;
|
||||
}
|
||||
if (grub_memcmp (args[i], "serial_usb",
|
||||
sizeof ("serial_usb") - 1) == 0
|
||||
&& grub_term_poll_usb)
|
||||
{
|
||||
grub_term_poll_usb (1);
|
||||
again = 1;
|
||||
continue;
|
||||
}
|
||||
if (!aut)
|
||||
return grub_error (GRUB_ERR_BAD_ARGUMENT,
|
||||
N_("terminal `%s' isn't found"),
|
||||
|
|
|
@ -196,7 +196,7 @@ grub_cmd_usbtest (grub_command_t cmd __attribute__ ((unused)),
|
|||
int argc __attribute__ ((unused)),
|
||||
char **args __attribute__ ((unused)))
|
||||
{
|
||||
grub_usb_poll_devices ();
|
||||
grub_usb_poll_devices (1);
|
||||
|
||||
grub_printf ("USB devices:\n\n");
|
||||
grub_usb_iterate (usb_iterate, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue