1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 00:32:04 +02:00

net: split net into net{,-common,-legacy,-lwip}

Make net.h a wrapper which includes net-common.h and either
net-legacy.h or net-lwip.h based on NET_LWIP. The function
copy_filename() can be useful when NET_LWIP is enabled, therefore
move it out of net/net.c which is built only when networking choice
is NET and create a new file net/net-common.c.

Signed-off-by: Jerome Forissier <jerome.forissier@linaro.org>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
Jerome Forissier
2024-10-16 12:04:00 +02:00
committed by Tom Rini
parent 8cb330355b
commit 1d5d292b79
8 changed files with 1081 additions and 952 deletions

View File

@@ -1693,18 +1693,6 @@ void net_set_udp_header(uchar *pkt, struct in_addr dest, int dport, int sport,
ip->udp_xsum = 0;
}
void copy_filename(char *dst, const char *src, int size)
{
if (src && *src && (*src == '"')) {
++src;
--size;
}
while ((--size > 0) && src && *src && (*src != '"'))
*dst++ = *src++;
*dst = '\0';
}
int is_serverip_in_cmd(void)
{
return !!strchr(net_boot_file_name, ':');