This is a trivial patch, but it removes 15 warnings with s 5-line change.
I didn't touch the ChangeLog, as it's so trivial...

Feel free to flame if this irrelevant stuff interferes with real work.
/alessandro

Index: netboot/etherboot.h
===================================================================
RCS file: /cvs/grub/netboot/etherboot.h,v
retrieving revision 1.7
diff -u -d -u -r1.7 etherboot.h
--- netboot/etherboot.h 2000/06/06 11:04:01     1.7
+++ netboot/etherboot.h 2000/08/31 18:01:21
@@ -605,8 +605,8 @@
 extern int freebsd_howto;
 #endif
 
-/* config.c */
-extern struct nic nic;
+/* config.c -- don't export "nic" to all files: nic drivers don't need it */
+/* extern struct nic nic; */
 
 /* bootmenu.c */
 
Index: netboot/fsys_tftp.c
===================================================================
RCS file: /cvs/grub/netboot/fsys_tftp.c,v
retrieving revision 1.11
diff -u -d -u -r1.11 fsys_tftp.c
--- netboot/fsys_tftp.c 2000/05/25 04:54:05     1.11
+++ netboot/fsys_tftp.c 2000/08/31 18:01:21
@@ -49,6 +49,8 @@
 static int
 buf_fill (int abort)
 {
+  extern struct nic nic; /* config.c */
+
 #ifdef TFTP_DEBUG
   grub_printf ("buf_fill (%d)\n", abort);
 #endif
Index: netboot/main.c
===================================================================
RCS file: /cvs/grub/netboot/main.c,v
retrieving revision 1.11
diff -u -d -u -r1.11 main.c
--- netboot/main.c      2000/07/29 19:22:54     1.11
+++ netboot/main.c      2000/08/31 18:01:21
@@ -323,6 +323,7 @@
   struct tftp_t tp;
   int rc;
   int packetsize = TFTP_DEFAULTSIZE_PACKET;
+  extern struct nic nic; /* config.c */
   
   /* Clear out the Rx queue first.  It contains nothing of interest,
    * except possibly ARP requests from the DHCP/TFTP server.  We use
@@ -673,6 +674,7 @@
   unsigned short ptype;
   unsigned int protohdrlen = (ETHER_HDR_SIZE + sizeof (struct iphdr)
                              + sizeof (struct udphdr));
+  extern struct nic nic; /* config.c */
 
   /* Clear the abort flag.  */
   ip_abort = 0;

Reply via email to