Don't load filessytem module for filesystem that was found but isn't used

for booting.
This commit is contained in:
mlelstv 2022-04-24 06:52:59 +00:00
parent 3b509fadef
commit 56b23fbb85
5 changed files with 13 additions and 13 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffsv1.c,v 1.8 2021/05/27 06:54:44 mrg Exp $ */
/* $NetBSD: ffsv1.c,v 1.9 2022/04/24 06:52:59 mlelstv Exp $ */
#define LIBSA_FFSv1
@ -19,8 +19,7 @@
#define FS_MAGIC FS_UFS1_MAGIC
#if 0
#define FSMOD "wapbl/ufs/ffs"
#endif
/* #define FSMOD "wapbl/ufs/ffs" */
#define FSMOD NULL
#include "ufs.c"

View File

@ -1,4 +1,4 @@
/* $NetBSD: ffsv2.c,v 1.8 2021/05/27 06:54:44 mrg Exp $ */
/* $NetBSD: ffsv2.c,v 1.9 2022/04/24 06:52:59 mlelstv Exp $ */
#define LIBSA_FFSv2
@ -19,8 +19,7 @@
#define FS_MAGIC FS_UFS2_MAGIC
#if 0
#define FSMOD "wapbl/ufs/ffs"
#endif
/* #define FSMOD "wapbl/ufs/ffs" */
#define FSMOD NULL
#include "ufs.c"

View File

@ -1,4 +1,4 @@
/* $NetBSD: files.c,v 1.1 2002/03/15 13:23:34 simonb Exp $ */
/* $NetBSD: files.c,v 1.2 2022/04/24 06:52:59 mlelstv Exp $ */
/*
* files.c:
@ -10,3 +10,4 @@
#include "stand.h"
struct open_file files[SOPEN_MAX];
const char *fsmod = NULL; /* file system module name to load */

View File

@ -1,4 +1,4 @@
/* $NetBSD: globals.c,v 1.11 2014/03/29 14:30:16 jakllsch Exp $ */
/* $NetBSD: globals.c,v 1.12 2022/04/24 06:52:59 mlelstv Exp $ */
/*
* globals.c:
@ -20,7 +20,6 @@ u_char bcea[ETHER_ADDR_LEN] = BA; /* broadcast ethernet address */
char rootpath[FNAME_SIZE]; /* root mount path */
char bootfile[FNAME_SIZE]; /* bootp says to boot this */
char hostname[FNAME_SIZE]; /* our hostname */
const char *fsmod = NULL; /* file system module name to load */
struct in_addr myip; /* my ip address */
struct in_addr rootip; /* root ip address */
struct in_addr gateip; /* swap ip address */

View File

@ -1,4 +1,4 @@
/* $NetBSD: ufs.c,v 1.82 2022/04/24 06:48:15 mlelstv Exp $ */
/* $NetBSD: ufs.c,v 1.83 2022/04/24 06:52:59 mlelstv Exp $ */
/*-
* Copyright (c) 1993
@ -857,9 +857,11 @@ ufs_open(const char *path, struct open_file *f)
out:
if (rc)
ufs_close(f);
#ifdef FSMOD /* Only defined for lfs */
else
#ifdef FSMOD
fsmod = FSMOD;
#else
fsmod = NULL;
#endif
return rc;
}