* Makefile.util.def (grub-mount): Add LIBGEOM to ldadd.
* grub-core/net/drivers/emu/emunet.c: Only include Linux-specific
headers on Linux.
(GRUB_MOD_INIT): Return immediately on non-Linux platforms; this
implementation is currently Linux-specific.
* util/getroot.c (exec_pipe): Define only on Linux or when either
libzfs or libnvpair is unavailable.
(find_root_devices_from_poolname): Remove unused path variable.
* grub-core/net/http.c (parse_line): Handle response 206.
(http_receive): Stall if too many packets are in the queue.
(http_establish): Fix range header.
(http_seek): Fix double free.
(http_close): Likewise.
(http_packets_pulled): New function.
(grub_http_protocol): Set http_seek
* grub-core/net/tcp.c (grub_net_tcp_socket): New field `i_stall'.
(ack_real): Set window depending on i_stall.
(grub_net_send_tcp_packet): Likewise.
(grub_net_tcp_stall): New function.
(grub_net_tcp_unstall): Likewise.
* include/grub/net/tcp.h (grub_net_tcp_stall): New proto.
(grub_net_tcp_unstall): Likewise.
* grub-core/net/net.c (receive_packets): Decrease the stop to 10
packets but stop only if stop condition is satisfied.
(grub_net_fs_read_real): Call packets_pulled after real read. Use
`stall' instead of `eof' as stop condition.
* grub-core/net/http.c (parse_line): Set `stall' on EOF.
(http_err): Likewise.
* grub-core/net/tftp.c (ack): Replace the first argument with data
instead of socket.
(tftp_receive): Stall if too many packets are in wait queue.
(tftp_packets_pulled): New function.
(grub_tftp_protocol): Set packets_pulled.
* include/grub/net.h (grub_net_packets): New field count.
(grub_net_put_packet): Increment count.
(grub_net_remove_packet): Likewise.
(grub_net_app_protocol): New field `packets_pulled'.
(grub_net): New field `stall'.
* grub-core/net/bootp.c (parse_dhcp_vendor): Parse mask.
(grub_net_configure_by_dhcp_ack): Use mask and grub_net_add_ipv4_local.
* grub-core/net/net.c (grub_net_add_addr): Split creating local route
into ...
(grub_net_add_ipv4_local): ... this.
(grub_cmd_addaddr): Use grub_net_add_ipv4_local.
* include/grub/net.h (GRUB_NET_BOOTP_NETMASK): New enum value.
(grub_net_add_ipv4_local): New proto.
* include/grub/ieee1275/ieee1275.h (grub_ieee1275_flag): New enum values
GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and
GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN.
* grub-core/net/drivers/efi/efinet.c (grub_efinet_findcards): Use
txbufsize.
* grub-core/kern/ieee1275/cmain.c (grub_ieee1275_find_options): Use
compatible property to check for macs. Set
GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX and
GRUB_IEEE1275_FLAG_VIRT_TO_REAL_BROKEN on macs.
* grub-core/net/drivers/ieee1275/ofnet.c (card_open): Don't add suffix
if GRUB_IEEE1275_FLAG_NO_OFNET_SUFFIX is set.
(send_card_buffer): Use txbuf.
(grub_ofnet_findcards): Allocate txbuf. Simplify code flow and move
nested function out of the parent while on it.
* include/grub/net.h (grub_net_poll_cards): New argument stop_condition.
All users updated.
* grub-core/net/arp.c (have_pending): New var.
(pending_req): Likewise.
(grub_net_arp_send_request): Fill pending_req and use have_pending as
stop indicator.
(grub_net_arp_receive): Set have_pending.
* grub-core/net/dns.c (recv_data): New field stop.
(recv_hook): Set stop.
(grub_net_dns_lookup): Init stop and use as stop condition.
* grub-core/net/http.c (http_establish): Use headers_recv as stop
condition.
* grub-core/net/net.c (grub_net_poll_cards): New argument
stop_condition. Stop when it goes true.
* grub-core/net/tcp.c (grub_net_tcp_open): Use `established' as stop
indicator.
* grub-core/net/tftp.c (tftp_open): Use `have_oack' as stop indicator.
* include/grub/net.h (grub_net_card_driver): Allow driver to modify
card. All users updated.
(grub_net_card): New members txbuf, rcvbuf, rcvbufsize and txbusy.
* grub-core/net/drivers/efi/efinet.c (send_card_buffer): Reuse buffer.
(get_card_packet): Likewise.
(grub_efinet_findcards): Init new fields.