mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-06 16:40:47 +00:00
nfs: do not panic on bootpc_init when no interfaces are found
Replaces panic with a warning message to allow kernel continue when no bootp eligible network interfaces are found. This avoids having to build a custom kernel when using a local root file system on targets like powerpcspe that expects bootp/NFS by default. Reviewed by: rmacklem MFC after: 2 weeks Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D34567
This commit is contained in:
parent
9df5f29caf
commit
0b1b30d664
|
@ -1501,7 +1501,7 @@ bootpc_decode_reply(struct nfsv3_diskless *nd, struct bootpc_ifcontext *ifctx,
|
|||
void
|
||||
bootpc_init(void)
|
||||
{
|
||||
struct bootpc_ifcontext *ifctx; /* Interface BOOTP contexts */
|
||||
struct bootpc_ifcontext *ifctx = NULL; /* Interface BOOTP contexts */
|
||||
struct bootpc_globalcontext *gctx; /* Global BOOTP context */
|
||||
struct ifnet *ifp;
|
||||
struct sockaddr_dl *sdl;
|
||||
|
@ -1571,9 +1571,13 @@ bootpc_init(void)
|
|||
}
|
||||
ifcnt++;
|
||||
}
|
||||
|
||||
IFNET_RUNLOCK();
|
||||
if (ifcnt == 0)
|
||||
panic("%s: no eligible interfaces", __func__);
|
||||
if (ifcnt == 0) {
|
||||
printf("WARNING: BOOTP found no eligible network interfaces, skipping!\n");
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (; ifcnt > 0; ifcnt--)
|
||||
allocifctx(gctx);
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue