Add a new BOOTSTATIC flag, NFS_BOOTSTATIC_NOSTATIC, which causes
nfs_bootstatic() to abort with EOPNOTSUPP. This allows a callback to say that there is no bootstatic config, and the next NFS boot method should be tried.
This commit is contained in:
parent
b8b2ef4d41
commit
a92a400fbf
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfs_bootstatic.c,v 1.4 2007/03/04 06:03:36 christos Exp $ */
|
||||
/* $NetBSD: nfs_bootstatic.c,v 1.5 2007/07/08 21:08:09 bouyer Exp $ */
|
||||
|
||||
/*
|
||||
*
|
||||
@ -33,7 +33,7 @@
|
||||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_bootstatic.c,v 1.4 2007/03/04 06:03:36 christos Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: nfs_bootstatic.c,v 1.5 2007/07/08 21:08:09 bouyer Exp $");
|
||||
|
||||
#include "opt_nfs_boot.h"
|
||||
#include "opt_inet.h"
|
||||
@ -78,6 +78,9 @@ nfs_bootstatic(struct nfs_diskless *nd, struct lwp *lwp)
|
||||
else
|
||||
flags = 0;
|
||||
|
||||
if (flags & NFS_BOOTSTATIC_NOSTATIC)
|
||||
return EOPNOTSUPP;
|
||||
|
||||
if (flags == 0) {
|
||||
#ifdef NFS_BOOTSTATIC_MYIP
|
||||
nd->nd_myip.s_addr = inet_addr(NFS_BOOTSTATIC_MYIP);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: nfsdiskless.h,v 1.25 2007/05/08 06:10:28 manu Exp $ */
|
||||
/* $NetBSD: nfsdiskless.h,v 1.26 2007/07/08 21:08:09 bouyer Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1995, 1997 The NetBSD Foundation, Inc.
|
||||
@ -98,6 +98,7 @@ extern int (*nfs_bootstatic_callback)(struct nfs_diskless *);
|
||||
#define NFS_BOOTSTATIC_HAS_MASK 0x04
|
||||
#define NFS_BOOTSTATIC_HAS_SERVADDR 0x08
|
||||
#define NFS_BOOTSTATIC_HAS_SERVER 0x10
|
||||
#define NFS_BOOTSTATIC_NOSTATIC 0x20
|
||||
#endif /* _KERNEL */
|
||||
|
||||
#endif /* _NFS_NFSDISKLESS_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user