Switch bootpc_adjust_interface() from returning int to void. Its one caller
doesn't check for errors, and all the errors that can happen result in it calling panic anyway, except for one that's really more of a warning (and is going to disappear on an upcoming commit anyway).
This commit is contained in:
parent
eb2d4f022c
commit
d32d350eeb
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=297324
@ -276,7 +276,7 @@ static int bootpc_call(struct bootpc_globalcontext *gctx,
|
|||||||
static void bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx,
|
static void bootpc_fakeup_interface(struct bootpc_ifcontext *ifctx,
|
||||||
struct thread *td);
|
struct thread *td);
|
||||||
|
|
||||||
static int bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
|
static void bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
|
||||||
struct bootpc_globalcontext *gctx, struct thread *td);
|
struct bootpc_globalcontext *gctx, struct thread *td);
|
||||||
|
|
||||||
static void bootpc_decode_reply(struct nfsv3_diskless *nd,
|
static void bootpc_decode_reply(struct nfsv3_diskless *nd,
|
||||||
@ -1011,7 +1011,7 @@ bootpc_shutdown_interface(struct bootpc_ifcontext *ifctx, struct thread *td)
|
|||||||
panic("%s: SIOCDIFADDR, error=%d", __func__, error);
|
panic("%s: SIOCDIFADDR, error=%d", __func__, error);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static void
|
||||||
bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
|
bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
|
||||||
struct bootpc_globalcontext *gctx, struct thread *td)
|
struct bootpc_globalcontext *gctx, struct thread *td)
|
||||||
{
|
{
|
||||||
@ -1034,7 +1034,7 @@ bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
|
|||||||
if (bootpc_ifctx_isresolved(ifctx) == 0) {
|
if (bootpc_ifctx_isresolved(ifctx) == 0) {
|
||||||
/* Shutdown interfaces where BOOTP failed */
|
/* Shutdown interfaces where BOOTP failed */
|
||||||
bootpc_shutdown_interface(ifctx, td);
|
bootpc_shutdown_interface(ifctx, td);
|
||||||
return (0);
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
printf("Adjusted interface %s", ifctx->ireq.ifr_name);
|
printf("Adjusted interface %s", ifctx->ireq.ifr_name);
|
||||||
@ -1082,11 +1082,9 @@ bootpc_adjust_interface(struct bootpc_ifcontext *ifctx,
|
|||||||
(RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL, RT_DEFAULT_FIB);
|
(RTF_UP | RTF_GATEWAY | RTF_STATIC), NULL, RT_DEFAULT_FIB);
|
||||||
if (error != 0) {
|
if (error != 0) {
|
||||||
printf("%s: RTM_ADD, error=%d\n", __func__, error);
|
printf("%s: RTM_ADD, error=%d\n", __func__, error);
|
||||||
return (error);
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
Loading…
Reference in New Issue
Block a user