[PATCH v3 06/12] net-lwip: add dns command

Jerome Forissier jerome.forissier at linaro.org
Thu Jun 6 18:21:41 CEST 2024



On 6/6/24 18:02, Ilias Apalodimas wrote:
> [...]
> 
>>>> +
>>>> +       if (!ipaddr) {
>>>> +               printf("DNS: host not found\n");
>>>> +               host_ipaddr.addr = 0;
>>>> +               return;
>>>> +       }
>>>> +
>>>> +       if (var)
>>>> +               env_set(var, ipstr);
>>>
>>> Do we need this? Won't this set <dns_name> == ipaddr?
>>
>> No, the syntax of the dns command is: 'dns hostname [env_var]' so one can
>> pretty much give any variable name to receive the IP address.
>>
>>> If we do not need it repurpose the void *arg and get rid of the global 'done'
>>
>> I could probably use a struct to get rid of the globals. Let me see what I can do.
> 
> Yea just pass a struct with char* and a bool * and you should be fine

Done in v4.

Thanks,
-- 
Jerome


More information about the U-Boot mailing list