- Add an entry to allow swapping on a vn device (if one is configured).
- Do the right thing when booting in NFS diskless mode, which is nothing. Make the default unconfigured entries for swdevt[0] and dumplo something that swapconf() will ignore and not choke on (the swap setup is done in nfs_vfsops.c when booting diskless).
This commit is contained in:
parent
d0930614cc
commit
dbda9e5ed2
@ -34,7 +34,7 @@
|
|||||||
* SUCH DAMAGE.
|
* SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* from: @(#)swapgeneric.c 5.5 (Berkeley) 5/9/91
|
* from: @(#)swapgeneric.c 5.5 (Berkeley) 5/9/91
|
||||||
* $Id: swapgeneric.c,v 1.8 1995/04/02 23:02:17 wpaul Exp $
|
* $Id: swapgeneric.c,v 1.9 1995/04/03 00:25:06 wpaul Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
@ -51,6 +51,7 @@
|
|||||||
#include "wd.h"
|
#include "wd.h"
|
||||||
#include "fd.h"
|
#include "fd.h"
|
||||||
#include "sd.h"
|
#include "sd.h"
|
||||||
|
#include "vn.h"
|
||||||
#include "cd.h"
|
#include "cd.h"
|
||||||
#include "mcd.h"
|
#include "mcd.h"
|
||||||
#include "scd.h"
|
#include "scd.h"
|
||||||
@ -64,13 +65,20 @@ dev_t dumpdev = NODEV;
|
|||||||
|
|
||||||
int nswap;
|
int nswap;
|
||||||
struct swdevt swdevt[] = {
|
struct swdevt swdevt[] = {
|
||||||
{ 1, 0, 0 },
|
{ makedev (0xFF, 0x00000001), 0, 0 },
|
||||||
|
#if NVN > 0
|
||||||
|
{ makedev (15, 0x00000001), 0, 0 },
|
||||||
|
#endif
|
||||||
{ NODEV, 0, 0 }, /* For NFS diskless */
|
{ NODEV, 0, 0 }, /* For NFS diskless */
|
||||||
{ NODEV, 0, 0 },
|
{ NODEV, 0, 0 },
|
||||||
};
|
};
|
||||||
long dumplo;
|
|
||||||
int dmmin, dmmax, dmtext;
|
int dmmin, dmmax, dmtext;
|
||||||
|
|
||||||
|
#ifdef NFS
|
||||||
|
extern int (*mountroot) __P((void));
|
||||||
|
extern int nfs_mountroot __P((void));
|
||||||
|
#endif
|
||||||
|
|
||||||
extern struct kern_devconf *dc_list;
|
extern struct kern_devconf *dc_list;
|
||||||
void gets __P((char *));
|
void gets __P((char *));
|
||||||
|
|
||||||
@ -134,6 +142,17 @@ bad:
|
|||||||
printf("use dk%%d\n");
|
printf("use dk%%d\n");
|
||||||
goto retry;
|
goto retry;
|
||||||
}
|
}
|
||||||
|
#ifdef NFS
|
||||||
|
if (mountroot == nfs_mountroot) {
|
||||||
|
/*
|
||||||
|
* The NFS code in nfs_vfsops.c handles root and swap
|
||||||
|
* for us if we're booting diskless. This is just to
|
||||||
|
* make swapconf() happy.
|
||||||
|
*/
|
||||||
|
dumplo = -1;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
unit = 0;
|
unit = 0;
|
||||||
for (gc = genericconf; gc->gc_name; gc++) {
|
for (gc = genericconf; gc->gc_name; gc++) {
|
||||||
kdc = dc_list;
|
kdc = dc_list;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user