mirror of
https://xff.cz/git/u-boot/
synced 2025-09-01 16:52:14 +02:00
net: Drop #ifdefs with CONFIG_BOOTP_SERVERIP
Use IS_ENABLED() instead, to reduce the number of build paths. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
This commit is contained in:
24
net/net.c
24
net/net.c
@@ -302,12 +302,12 @@ void net_auto_load(void)
|
||||
if (s != NULL && strcmp(s, "NFS") == 0) {
|
||||
if (net_check_prereq(NFS)) {
|
||||
/* We aren't expecting to get a serverip, so just accept the assigned IP */
|
||||
#ifdef CONFIG_BOOTP_SERVERIP
|
||||
net_set_state(NETLOOP_SUCCESS);
|
||||
#else
|
||||
printf("Cannot autoload with NFS\n");
|
||||
net_set_state(NETLOOP_FAIL);
|
||||
#endif
|
||||
if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
|
||||
net_set_state(NETLOOP_SUCCESS);
|
||||
} else {
|
||||
printf("Cannot autoload with NFS\n");
|
||||
net_set_state(NETLOOP_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
/*
|
||||
@@ -327,12 +327,12 @@ void net_auto_load(void)
|
||||
}
|
||||
if (net_check_prereq(TFTPGET)) {
|
||||
/* We aren't expecting to get a serverip, so just accept the assigned IP */
|
||||
#ifdef CONFIG_BOOTP_SERVERIP
|
||||
net_set_state(NETLOOP_SUCCESS);
|
||||
#else
|
||||
printf("Cannot autoload with TFTPGET\n");
|
||||
net_set_state(NETLOOP_FAIL);
|
||||
#endif
|
||||
if (IS_ENABLED(CONFIG_BOOTP_SERVERIP)) {
|
||||
net_set_state(NETLOOP_SUCCESS);
|
||||
} else {
|
||||
printf("Cannot autoload with TFTPGET\n");
|
||||
net_set_state(NETLOOP_FAIL);
|
||||
}
|
||||
return;
|
||||
}
|
||||
tftp_start(TFTPGET);
|
||||
|
Reference in New Issue
Block a user