]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* grub-core/net/drivers/ieee1275/ofnet.c (get_card_packet): Fix packet
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 19 Jun 2012 09:25:37 +0000 (11:25 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Tue, 19 Jun 2012 09:25:37 +0000 (11:25 +0200)
presence check.
(grub_ieee1275_net_config_real): Fix config pointer.

ChangeLog
grub-core/net/drivers/ieee1275/ofnet.c

index 16213a794f53faca5d48050ab918f3af0cdd6ae5..b401bda35a38525111c116886df4bfe0f0f5ddfd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * grub-core/net/drivers/ieee1275/ofnet.c (get_card_packet): Fix packet
+       presence check.
+       (grub_ieee1275_net_config_real): Fix config pointer.
+
 2012-06-19  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * grub-core/kern/ieee1275/openfw.c (grub_ieee1275_parse_args): Extend
index fb9f31cf66ec24a9dc2f51c6c3e88ce9b30bb81e..a31b77fe024959778b6f89b112916d4cbb0bc7fe 100644 (file)
@@ -96,7 +96,7 @@ get_card_packet (struct grub_net_card *dev)
   do
     rc = grub_ieee1275_read (data->handle, nb->data, dev->mtu + 64, &actual);
   while ((actual <= 0 || rc < 0) && (grub_get_time_ms () - start_time < 200));
-  if (actual)
+  if (actual > 0)
     {
       grub_netbuff_put (nb, actual);
       return nb;
@@ -176,8 +176,8 @@ grub_ieee1275_net_config_real (const char *devpath, char **device, char **path)
 
     grub_net_configure_by_dhcp_ack (card->name, card, 0,
                                    (struct grub_net_bootp_packet *)
-                                   &bootp_response
-                                   + bootp_response_properties[i].offset,
+                                   (bootp_response
+                                    + bootp_response_properties[i].offset),
                                    size - bootp_response_properties[i].offset,
                                    1, device, path);
     return;