On 29.04.2012 17:05, Bean wrote:
> +  for (i = 0; i < 3; i++)
>      {
> +      grub_uint64_t limit_time;      
> +      
> +      efi_call_3 (net->get_status, net, &int_status, 0);
> +
> +      limit_time = grub_get_time_ms () + 5;
> +      for (;;)
> +     {
> +       st = efi_call_7 (net->transmit, net, 0, (pack->tail - pack->data),
> +                        pack->data, NULL, NULL, NULL);
> +       if (st != GRUB_EFI_NOT_READY)
> +         break;
> +
> +       if (limit_time < grub_get_time_ms ())
> +         {
> +           st = GRUB_EFI_TIMEOUT;
> +           break;
> +         }
> +     }
> +
> +      if (st)
> +     goto quit;
> +
>        void *txbuf = NULL;
> -      st = efi_call_3 (net->get_status, net, 0, &txbuf);
> -      if (st != GRUB_EFI_SUCCESS)
> -     return grub_error (GRUB_ERR_IO, N_("couldn't send network packet"));
> -      if (txbuf)
> -     return GRUB_ERR_NONE;
> -      if (limit_time < grub_get_time_ms ())
> -     return grub_error (GRUB_ERR_TIMEOUT, N_("couldn't send network 
> packet"));
> +      limit_time = grub_get_time_ms () + 5;
> +      for (;;)
> +     {                 
> +       st = efi_call_3 (net->get_status, net, &int_status, &txbuf);
> +
> +       if (txbuf != NULL)
> +         break;
> +
> +       if (limit_time < grub_get_time_ms ())
> +         {
> +           st = GRUB_EFI_TIMEOUT;
> +           break;
> +         }
> +     }
> +
> +    quit:
> +      if (st != GRUB_EFI_TIMEOUT)
> +     break;
>      }
> +
> +  return st;
>  }
I see no justification as to why this part of patch so I can't know if
it's something which is we absolutely need to commit or something that
can wait.

-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko


Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to