separate globals, add the bootinfo.c file to the lib

This commit is contained in:
cgd 1993-10-13 16:33:55 +00:00
parent ababab0671
commit b6a7521043
3 changed files with 37 additions and 24 deletions

View File

@ -1,8 +1,8 @@
# $Id: Makefile,v 1.3 1993/10/13 11:31:32 cgd Exp $
# $Id: Makefile,v 1.4 1993/10/13 16:33:55 cgd Exp $
LIB= netboot
SRCS= arp.c bootp.c exec.c in_cksum.c net.c netif.c nfsboot.c \
rpc.c util.c
SRCS= arp.c bootinfo.c bootp.c exec.c globals.c in_cksum.c \
net.c netif.c nfsboot.c rpc.c util.c
CFLAGS+= -DCOMMON_ETHERADDR
NOPROFILE=

View File

@ -31,7 +31,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Header: /cvsroot/src/sys/lib/libnetboot/Attic/boot_nfs.c,v 1.1 1993/10/13 05:41:37 cgd Exp $
* $Header: /cvsroot/src/sys/lib/libnetboot/Attic/boot_nfs.c,v 1.2 1993/10/13 16:33:58 cgd Exp $
*/
/*
* Copyright (c) 1992 Regents of the University of California.
@ -69,7 +69,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* @(#) $Header: /cvsroot/src/sys/lib/libnetboot/Attic/boot_nfs.c,v 1.1 1993/10/13 05:41:37 cgd Exp $ (LBL)
* @(#) $Header: /cvsroot/src/sys/lib/libnetboot/Attic/boot_nfs.c,v 1.2 1993/10/13 16:33:58 cgd Exp $ (LBL)
*/
#include <sys/param.h>
@ -89,25 +89,6 @@
#include "bootp.h"
#include "netif.h"
/* Globals */
u_char bcea[6] = BA; /* broadcast ethernet address */
char rootpath[FNAME_SIZE]; /* root mount path */
char swappath[FNAME_SIZE]; /* swap mount path */
char ifname[IFNAME_SIZE]; /* name of interface (e.g. "le0") */
n_long rootip; /* root ip address */
n_long swapip; /* swap ip address */
n_long gateip; /* swap ip address */
n_long smask; /* subnet mask */
n_long nmask; /* net mask */
n_long mask; /* subnet or net mask */
time_t bot; /* beginning of time in seconds */
#ifdef DEBUG
int debug = 1;
#else
int debug = 0;
#endif
static u_char rootfh[NFS_FHSIZE];
static u_char swapfh[NFS_FHSIZE];
static u_long swapblks;

View File

@ -0,0 +1,32 @@
/*
* globals.c:
*
* global variables should be separate, so nothing else
* must be included extraneously.
*
* $Id: globals.c,v 1.1 1993/10/13 16:33:56 cgd Exp $
*/
#include <sys/param.h>
#include <netinet/in.h>
#include <netinet/in_systm.h>
#include "netboot.h"
u_char bcea[6] = BA; /* broadcast ethernet address */
char rootpath[FNAME_SIZE]; /* root mount path */
char swappath[FNAME_SIZE]; /* swap mount path */
char ifname[IFNAME_SIZE]; /* name of interface (e.g. "le0") */
n_long rootip; /* root ip address */
n_long swapip; /* swap ip address */
n_long gateip; /* swap ip address */
n_long smask; /* subnet mask */
n_long nmask; /* net mask */
n_long mask; /* subnet or net mask */
time_t bot; /* beginning of time in seconds */
#ifdef DEBUG
int debug = 1;
#else
int debug = 0;
#endif