diff options
author | Tom Rini <trini@konsulko.com> | 2022-04-23 08:06:28 -0400 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2022-04-23 08:06:28 -0400 |
commit | 9bb99fa95826d1a608737ca821977b4136a1a278 (patch) | |
tree | 264c39d01f071f308b3b7f8bc88b20cb09681653 /net/net.c | |
parent | faeb5641131ba0bfafa5ed61dd03b98b1f2a5edb (diff) | |
parent | a609353e82fd757b7635d18ed6a0828fff657d59 (diff) |
Merge branch '2022-04-22-assorted-updates'
- Add "-q" to fdt addr and use it in distro_bootcmd to make the user
experience less scary reading in normal try/fail cases.
- Let the adc update an environment variable like many other commands do
- Fix TPL SEPARATE_BSS check when locating DTB
- Allow ":" in PXE file names again
- Two Apple M1 fixes
Diffstat (limited to 'net/net.c')
-rw-r--r-- | net/net.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/net/net.c b/net/net.c index 072a82d8f9c..034a5d6e67c 100644 --- a/net/net.c +++ b/net/net.c @@ -1538,14 +1538,19 @@ int is_serverip_in_cmd(void) int net_parse_bootfile(struct in_addr *ipaddr, char *filename, int max_len) { char *colon; + struct in_addr ip; + ip.s_addr = 0; if (net_boot_file_name[0] == '\0') return 0; colon = strchr(net_boot_file_name, ':'); if (colon) { - if (ipaddr) - *ipaddr = string_to_ip(net_boot_file_name); + ip = string_to_ip(net_boot_file_name); + if (ipaddr && ip.s_addr) + *ipaddr = ip; + } + if (ip.s_addr) { strncpy(filename, colon + 1, max_len); } else { strncpy(filename, net_boot_file_name, max_len); |