mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-22 01:13:00 +02:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user