network/netdev: split out netdev_attach() and netdev_attach_name() from netdev_load_one()

No functional change, just refactoring and preparation for later
commits.
This commit is contained in:
Yu Watanabe
2024-09-10 19:29:05 +09:00
parent 0dc71b9584
commit bfacb8fe1d
2 changed files with 44 additions and 15 deletions
+2
View File
@@ -5,6 +5,7 @@
#include "conf-parser.h"
#include "ether-addr-util.h"
#include "hash-funcs.h"
#include "list.h"
#include "log-link.h"
#include "networkd-link.h"
@@ -195,6 +196,7 @@ extern const NetDevVTable * const netdev_vtable[_NETDEV_KIND_MAX];
/* For casting the various netdev kinds into a netdev */
#define NETDEV(n) (&(n)->meta)
int netdev_attach_name(NetDev *netdev, const char *name);
NetDev* netdev_detach_name(NetDev *netdev, const char *name);
void netdev_detach(NetDev *netdev);