confd: Rename get_phys_addr and make it not static

This to be able to use the function in hardware.c, when
setting up bssids.
This commit is contained in:
Mattias Walström
2026-01-06 20:20:18 +01:00
parent fe86744ca2
commit 89a3ccd51c
2 changed files with 4 additions and 3 deletions
+3 -3
View File
@@ -224,7 +224,7 @@ const char *get_chassis_addr(void)
return json_string_value(addr);
}
static int get_phys_addr(struct lyd_node *cif, char *mac)
int interface_get_phys_addr(struct lyd_node *cif, char *mac)
{
struct lyd_node *cpa, *chassis;
const char *base, *offs;
@@ -255,7 +255,7 @@ int link_gen_address(struct lyd_node *cif, FILE *ip)
char mac[18];
int err;
err = get_phys_addr(cif, mac);
err = interface_get_phys_addr(cif, mac);
if (err)
return err;
@@ -272,7 +272,7 @@ static int netdag_gen_link_addr(FILE *ip, struct lyd_node *cif, struct lyd_node
if (!lydx_get_child(dif, "custom-phys-address"))
return 0;
err = get_phys_addr(cif, mac);
err = interface_get_phys_addr(cif, mac);
if (err)
return (err == -ENODATA) ? 0 : err;
+1
View File
@@ -101,6 +101,7 @@ int netdag_gen_ethtool(struct dagger *net, struct lyd_node *cif, struct lyd_node
/* interfaces.c */
const char *get_chassis_addr(void);
int interface_get_phys_addr(struct lyd_node *cif, char *mac);
int link_gen_address(struct lyd_node *cif, FILE *ip);
int interfaces_get_all_l3(const struct lyd_node *tree, char ***ifaces);