On Monday, 13 January 2025 20:31:39 CET Linus Lüssing wrote:
hard_iface = batadv_netlink_get_hardif(bat_priv, cb);
if (IS_ERR(hard_iface) && PTR_ERR(hard_iface) != -ENONET) {
ret = PTR_ERR(hard_iface);
goto out_put_primary_if;
} else if (IS_ERR(hard_iface)) {
/* => PTR_ERR(hard_iface) == -ENOENT
No, this would mean that the error is "ENONET" (Machine is not on the network) and not ENOENT (No such file or directory). Is this a typo in the comment or did you actually wanted to use ENOENT in the rest of the code?
* => no hard-iface given, ok
*/
hard_iface = BATADV_IF_DEFAULT; }
Kind regards, Sven