Move a relic to its correct location(s): Put nfs diskless initialization
calls with the code they call. (Yet another example of mindless copy&paste).
This commit is contained in:
parent
742b7f01d2
commit
0658bb8ef8
sys
alpha/alpha
amd64/amd64
i386/i386
ia64/ia64
nfsclient
@ -29,8 +29,6 @@ __FBSDID("$FreeBSD$");
|
||||
|
||||
#include "opt_bootp.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_nfs.h"
|
||||
#include "opt_nfsroot.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -67,8 +65,6 @@ static void configure_start(void);
|
||||
device_t isa_bus_device = 0;
|
||||
#endif
|
||||
|
||||
extern int nfs_diskless_valid; /* XXX use include file */
|
||||
|
||||
static void
|
||||
configure_start()
|
||||
{
|
||||
@ -194,20 +190,3 @@ configure(void *dummy)
|
||||
|
||||
cold = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do legacy root filesystem discovery. This isn't really
|
||||
* needed on the Alpha, which has always used the loader.
|
||||
*/
|
||||
void
|
||||
cpu_rootconf()
|
||||
{
|
||||
#if defined(NFSCLIENT) && defined(NFS_ROOT)
|
||||
int order = 0;
|
||||
#if !defined(BOOTP_NFSROOT)
|
||||
if (nfs_diskless_valid)
|
||||
#endif
|
||||
rootdevnames[order++] = "nfs:";
|
||||
#endif
|
||||
}
|
||||
SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL)
|
||||
|
@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$");
|
||||
*/
|
||||
#include "opt_bootp.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_nfs.h"
|
||||
#include "opt_nfsroot.h"
|
||||
#include "opt_bus.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -66,10 +64,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <net/if_var.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <nfs/rpcv2.h>
|
||||
#include <nfs/nfsproto.h>
|
||||
#include <nfsclient/nfs.h>
|
||||
#include <nfsclient/nfsdiskless.h>
|
||||
|
||||
#include <machine/md_var.h>
|
||||
|
||||
@ -136,22 +130,3 @@ configure_final(dummy)
|
||||
printf("Device configuration finished.\n");
|
||||
cold = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do legacy root filesystem discovery.
|
||||
*/
|
||||
void
|
||||
cpu_rootconf()
|
||||
{
|
||||
#ifdef BOOTP
|
||||
bootpc_init();
|
||||
#endif
|
||||
#if defined(NFSCLIENT) && defined(NFS_ROOT)
|
||||
#if !defined(BOOTP_NFSROOT)
|
||||
nfs_setup_diskless();
|
||||
if (nfs_diskless_valid)
|
||||
#endif
|
||||
rootdevnames[0] = "nfs:";
|
||||
#endif
|
||||
}
|
||||
SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL)
|
||||
|
@ -45,8 +45,6 @@ __FBSDID("$FreeBSD$");
|
||||
*/
|
||||
#include "opt_bootp.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_nfs.h"
|
||||
#include "opt_nfsroot.h"
|
||||
#include "opt_bus.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -66,10 +64,6 @@ __FBSDID("$FreeBSD$");
|
||||
#include <net/if_var.h>
|
||||
#include <net/ethernet.h>
|
||||
#include <netinet/in.h>
|
||||
#include <nfs/rpcv2.h>
|
||||
#include <nfs/nfsproto.h>
|
||||
#include <nfsclient/nfs.h>
|
||||
#include <nfsclient/nfsdiskless.h>
|
||||
|
||||
#include <machine/bootinfo.h>
|
||||
#include <machine/md_var.h>
|
||||
@ -174,22 +168,3 @@ configure_final(dummy)
|
||||
}
|
||||
cold = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do legacy root filesystem discovery.
|
||||
*/
|
||||
void
|
||||
cpu_rootconf()
|
||||
{
|
||||
#ifdef BOOTP
|
||||
bootpc_init();
|
||||
#endif
|
||||
#if defined(NFSCLIENT) && defined(NFS_ROOT)
|
||||
#if !defined(BOOTP_NFSROOT)
|
||||
nfs_setup_diskless();
|
||||
if (nfs_diskless_valid)
|
||||
#endif
|
||||
rootdevnames[0] = "nfs:";
|
||||
#endif
|
||||
}
|
||||
SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL)
|
||||
|
@ -28,8 +28,6 @@
|
||||
|
||||
#include "opt_bootp.h"
|
||||
#include "opt_isa.h"
|
||||
#include "opt_nfs.h"
|
||||
#include "opt_nfsroot.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -63,8 +61,6 @@ void bootpc_init(void);
|
||||
device_t isa_bus_device = 0;
|
||||
#endif
|
||||
|
||||
extern int nfs_diskless_valid; /* XXX use include file */
|
||||
|
||||
/*
|
||||
* Determine i/o configuration for a machine.
|
||||
*/
|
||||
@ -91,26 +87,3 @@ configure(void *dummy)
|
||||
|
||||
cold = 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* Do legacy root filesystem discovery. This isn't really
|
||||
* needed on the Alpha, which has always used the loader.
|
||||
*/
|
||||
void
|
||||
cpu_rootconf()
|
||||
{
|
||||
#if defined(NFSCLIENT) && defined(NFS_ROOT)
|
||||
int order = 0;
|
||||
#endif
|
||||
|
||||
#ifdef BOOTP
|
||||
bootpc_init();
|
||||
#endif
|
||||
#if defined(NFSCLIENT) && defined(NFS_ROOT)
|
||||
#if !defined(BOOTP_NFSROOT)
|
||||
if (nfs_diskless_valid)
|
||||
#endif
|
||||
rootdevnames[order++] = "nfs:";
|
||||
#endif
|
||||
}
|
||||
SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, cpu_rootconf, NULL)
|
||||
|
@ -1740,6 +1740,7 @@ bootpc_init(void)
|
||||
#endif
|
||||
}
|
||||
|
||||
rootdevnames[0] = "nfs:";
|
||||
mountopts(&nd->root_args, NULL);
|
||||
|
||||
for (ifctx = gctx->interfaces; ifctx != NULL; ifctx = ifctx->next)
|
||||
@ -1894,3 +1895,5 @@ out:
|
||||
m_freem(m);
|
||||
return error;
|
||||
}
|
||||
|
||||
SYSINIT(bootp_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, bootpc_init, NULL);
|
||||
|
@ -231,3 +231,17 @@ decode_nfshandle(char *ev, u_char *fh)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined(BOOTP_NFSROOT)
|
||||
static void
|
||||
nfs_rootconf(void)
|
||||
{
|
||||
|
||||
nfs_setup_diskless();
|
||||
if (nfs_diskless_valid)
|
||||
rootdevnames[0] = "nfs:";
|
||||
}
|
||||
|
||||
SYSINIT(cpu_rootconf, SI_SUB_ROOT_CONF, SI_ORDER_FIRST, nfs_rootconf, NULL)
|
||||
#endif
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user