return -1;
}
-int ethtool_set_features(int *fd, const char *ifname, NetDevFeature *features) {
+int ethtool_set_features(int *fd, const char *ifname, int *features) {
_cleanup_free_ struct ethtool_gstrings *strings = NULL;
struct ethtool_sfeatures *sfeatures;
int block, bit, i, r;
int ethtool_get_driver(int *fd, const char *ifname, char **ret);
int ethtool_set_speed(int *fd, const char *ifname, unsigned int speed, Duplex duplex);
int ethtool_set_wol(int *fd, const char *ifname, WakeOnLan wol);
-int ethtool_set_features(int *fd, const char *ifname, NetDevFeature *features);
+int ethtool_set_features(int *fd, const char *ifname, int *features);
int ethtool_set_glinksettings(int *fd, const char *ifname, struct link_config *link);
int ethtool_set_channels(int *fd, const char *ifname, netdev_channels *channels);
static int load_link(link_config_ctx *ctx, const char *filename) {
_cleanup_(link_config_freep) link_config *link = NULL;
_cleanup_fclose_ FILE *file = NULL;
+ int i;
int r;
assert(ctx);
link->port = _NET_DEV_PORT_INVALID;
link->autonegotiation = -1;
- memset(&link->features, 0xFF, sizeof(link->features));
+ for (i = 0; i < (int)ELEMENTSOF(link->features); i++)
+ link->features[i] = -1;
r = config_parse(NULL, filename, file,
"Match\0Link\0Ethernet\0",
int autonegotiation;
WakeOnLan wol;
NetDevPort port;
- NetDevFeature features[_NET_DEV_FEAT_MAX];
+ int features[_NET_DEV_FEAT_MAX];
netdev_channels channels;
LIST_FIELDS(link_config, links);