mirror of
https://github.com/systemd/systemd.git
synced 2025-03-28 02:50:16 +03:00
network/netdev: introduce .is_ready_to_create() entry in netdev vtable
This commit is contained in:
parent
d2a58f0edb
commit
562729d744
@ -628,6 +628,9 @@ static bool netdev_is_ready_to_create(NetDev *netdev, Link *link) {
|
||||
if (link->set_link_messages > 0)
|
||||
return false;
|
||||
|
||||
if (NETDEV_VTABLE(netdev)->is_ready_to_create)
|
||||
return NETDEV_VTABLE(netdev)->is_ready_to_create(netdev, link);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -153,6 +153,9 @@ typedef struct NetDevVTable {
|
||||
/* specifies if netdev is independent, or a master device or a stacked device */
|
||||
NetDevCreateType create_type;
|
||||
|
||||
/* This is used for stacked netdev. Return true when the underlying link is ready. */
|
||||
int (*is_ready_to_create)(NetDev *netdev, Link *link);
|
||||
|
||||
/* create netdev, if not done via rtnl */
|
||||
int (*create)(NetDev *netdev);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user