1
0
mirror of https://github.com/openbsd/src.git synced 2025-01-10 06:47:55 -08:00

Give back some space to the ramdisk by compiling net/radix.c only

if we compile pf, ipsec, pipex or nfsserver.
Suggested by mpi some time ago.
Tweak & OK bluhm
deraadt assumes it's fair
This commit is contained in:
florian 2017-07-31 16:47:03 +00:00
parent 40837cf207
commit 207fea7108
2 changed files with 16 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: files,v 1.649 2017/07/30 18:16:14 florian Exp $
# $OpenBSD: files,v 1.650 2017/07/31 16:47:03 florian Exp $
# $NetBSD: files,v 1.87 1996/05/19 17:17:50 jonathan Exp $
# @(#)files.newconf 7.5 (Berkeley) 5/10/93
@ -784,7 +784,7 @@ file net/if_switch.c switch needs-count
file net/switchctl.c switch
file net/switchofp.c switch
file net/pipex.c pipex
file net/radix.c
file net/radix.c pf | ipsec | pipex | nfsserver
file net/raw_cb.c
file net/raw_usrreq.c
file net/rtable.c

View File

@ -1,4 +1,4 @@
/* $OpenBSD: vfs_subr.c,v 1.259 2017/04/20 14:13:00 visa Exp $ */
/* $OpenBSD: vfs_subr.c,v 1.260 2017/07/31 16:47:03 florian Exp $ */
/* $NetBSD: vfs_subr.c,v 1.53 1996/04/22 01:39:13 christos Exp $ */
/*
@ -155,7 +155,9 @@ vntblinit(void)
*/
vn_initialize_syncerd();
#ifdef NFSSERVER
rn_init(sizeof(struct sockaddr_in));
#endif /* NFSSERVER */
}
/*
@ -1354,9 +1356,10 @@ vfs_mountedon(struct vnode *vp)
return (error);
}
#ifdef NFSSERVER
/*
* Build hash lists of net addresses and hang them off the mount point.
* Called by ufs_mount() to set up the lists of export addresses.
* Called by vfs_export() to set up the lists of export addresses.
*/
int
vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
@ -1454,10 +1457,12 @@ vfs_free_addrlist(struct netexport *nep)
nep->ne_rtable_inet = NULL;
}
}
#endif /* NFSSERVER */
int
vfs_export(struct mount *mp, struct netexport *nep, struct export_args *argp)
{
#ifdef NFSSERVER
int error;
if (argp->ex_flags & MNT_DELEXPORT) {
@ -1470,11 +1475,15 @@ vfs_export(struct mount *mp, struct netexport *nep, struct export_args *argp)
mp->mnt_flag |= MNT_EXPORTED;
}
return (0);
#else
return (ENOTSUP);
#endif /* NFSSERVER */
}
struct netcred *
vfs_export_lookup(struct mount *mp, struct netexport *nep, struct mbuf *nam)
{
#ifdef NFSSERVER
struct netcred *np;
struct radix_node_head *rnh;
struct sockaddr *saddr;
@ -1504,6 +1513,9 @@ vfs_export_lookup(struct mount *mp, struct netexport *nep, struct mbuf *nam)
np = &nep->ne_defexported;
}
return (np);
#else
return (NULL);
#endif /* NFSSERVER */
}
/*