openbmc/build/tmp/deploy/sdk/witherspoon-2019-08-08/sysroots/armv6-openbmc-linux-gnueabi/usr/src/debug/systemd/1_242+AUTOINC+db2e367bfc-r0/git/src/network/netdev/netdev.c
int netdev_join(NetDev* netdev, Link* link,
                link_netlink_message_handler_t callback)
{
    int r;

    assert(netdev);
    assert(netdev->manager);
    assert(netdev->manager->rtnl);

    switch (netdev_get_create_type(netdev))
    {
        case NETDEV_CREATE_MASTER:
            r = netdev_enslave(netdev, link, callback);
            if (r < 0)
                return r;

            break;
        case NETDEV_CREATE_STACKED:
            r = netdev_create(netdev, link, callback);
            if (r < 0)
                return r;

            break;
        case NETDEV_CREATE_AFTER_CONFIGURED:
            r = netdev_create_after_configured(netdev, link);
            if (r < 0)
                return r;
            break;
        default:
            assert_not_reached("Can not join independent netdev");
    }

    return 0;
}
/* the callback must be called, possibly after a timeout, as otherwise the Link
 * will hang */
the callback must be called, possibly after a timeout, as otherwise the Link
will hang
the callback must be called possibly after a timeout as otherwise the Link will hang
int netdev_join(NetDev* netdev, Link* link,
                link_netlink_message_handler_t callback)
{
    int r;
    assert(netdev);
    assert(netdev->manager);
    assert(netdev->manager->rtnl);
    switch (netdev_get_create_type(netdev))
    {
        case NETDEV_CREATE_MASTER:
            r = netdev_enslave(netdev, link, callback);
            if (r < 0)
                return r;
            break;
        case NETDEV_CREATE_STACKED:
            r = netdev_create(netdev, link, callback);
            if (r < 0)
                return r;
            break;
        case NETDEV_CREATE_AFTER_CONFIGURED:
            r = netdev_create_after_configured(netdev, link);
            if (r < 0)
                return r;
            break;
        default:
            assert_not_reached("Can not join independent netdev");
    }
    return 0;
}
int netdev_join ( NetDev * netdev , Link * link , link_netlink_message_handler_t callback ) { int r ; assert ( netdev ) ; assert ( netdev -> manager ) ; assert ( netdev -> manager -> rtnl ) ; switch ( netdev_get_create_type ( netdev ) ) { case NETDEV_CREATE_MASTER : r = netdev_enslave ( netdev , link , callback ) ; if ( r < 0 ) return r ; break ; case NETDEV_CREATE_STACKED : r = netdev_create ( netdev , link , callback ) ; if ( r < 0 ) return r ; break ; case NETDEV_CREATE_AFTER_CONFIGURED : r = netdev_create_after_configured ( netdev , link ) ; if ( r < 0 ) return r ; break ; default : assert_not_reached ( " " ) ; } return 0 ; }
the callback must be called, possibly after a timeout, as otherwise the Link
 will hang
the callback must be called possibly after a timeout as otherwise the Link will hang