ethtool: constify arguments for ethtool_set_xxx()
This commit is contained in:
parent
87bc687a8c
commit
cadc7ed2e2
|
@ -414,7 +414,7 @@ int ethtool_set_wol(int *ethtool_fd, const char *ifname, WakeOnLan wol) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ethtool_set_nic_buffer_size(int *ethtool_fd, const char *ifname, netdev_ring_param *ring) {
|
int ethtool_set_nic_buffer_size(int *ethtool_fd, const char *ifname, const netdev_ring_param *ring) {
|
||||||
struct ethtool_ringparam ecmd = {
|
struct ethtool_ringparam ecmd = {
|
||||||
.cmd = ETHTOOL_GRINGPARAM
|
.cmd = ETHTOOL_GRINGPARAM
|
||||||
};
|
};
|
||||||
|
@ -543,7 +543,7 @@ static int set_features_bit(
|
||||||
return found ? 0 : -ENODATA;
|
return found ? 0 : -ENODATA;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ethtool_set_features(int *ethtool_fd, const char *ifname, int *features) {
|
int ethtool_set_features(int *ethtool_fd, const char *ifname, const int *features) {
|
||||||
_cleanup_free_ struct ethtool_gstrings *strings = NULL;
|
_cleanup_free_ struct ethtool_gstrings *strings = NULL;
|
||||||
struct ethtool_sfeatures *sfeatures;
|
struct ethtool_sfeatures *sfeatures;
|
||||||
struct ifreq ifr = {};
|
struct ifreq ifr = {};
|
||||||
|
@ -754,7 +754,7 @@ int ethtool_set_glinksettings(
|
||||||
int *fd,
|
int *fd,
|
||||||
const char *ifname,
|
const char *ifname,
|
||||||
int autonegotiation,
|
int autonegotiation,
|
||||||
uint32_t advertise[static N_ADVERTISE],
|
const uint32_t advertise[static N_ADVERTISE],
|
||||||
uint64_t speed,
|
uint64_t speed,
|
||||||
Duplex duplex,
|
Duplex duplex,
|
||||||
NetDevPort port) {
|
NetDevPort port) {
|
||||||
|
@ -813,7 +813,7 @@ int ethtool_set_glinksettings(
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ethtool_set_channels(int *fd, const char *ifname, netdev_channels *channels) {
|
int ethtool_set_channels(int *fd, const char *ifname, const netdev_channels *channels) {
|
||||||
struct ethtool_channels ecmd = {
|
struct ethtool_channels ecmd = {
|
||||||
.cmd = ETHTOOL_GCHANNELS
|
.cmd = ETHTOOL_GCHANNELS
|
||||||
};
|
};
|
||||||
|
|
|
@ -101,12 +101,12 @@ int ethtool_get_link_info(int *ethtool_fd, const char *ifname,
|
||||||
int ethtool_get_permanent_macaddr(int *ethtool_fd, const char *ifname, struct ether_addr *ret);
|
int ethtool_get_permanent_macaddr(int *ethtool_fd, const char *ifname, struct ether_addr *ret);
|
||||||
int ethtool_set_speed(int *ethtool_fd, const char *ifname, unsigned speed, Duplex duplex);
|
int ethtool_set_speed(int *ethtool_fd, const char *ifname, unsigned speed, Duplex duplex);
|
||||||
int ethtool_set_wol(int *ethtool_fd, const char *ifname, WakeOnLan wol);
|
int ethtool_set_wol(int *ethtool_fd, const char *ifname, WakeOnLan wol);
|
||||||
int ethtool_set_nic_buffer_size(int *ethtool_fd, const char *ifname, netdev_ring_param *ring);
|
int ethtool_set_nic_buffer_size(int *ethtool_fd, const char *ifname, const netdev_ring_param *ring);
|
||||||
int ethtool_set_features(int *ethtool_fd, const char *ifname, int *features);
|
int ethtool_set_features(int *ethtool_fd, const char *ifname, const int *features);
|
||||||
int ethtool_set_glinksettings(int *ethtool_fd, const char *ifname,
|
int ethtool_set_glinksettings(int *ethtool_fd, const char *ifname,
|
||||||
int autonegotiation, uint32_t advertise[static N_ADVERTISE],
|
int autonegotiation, const uint32_t advertise[static N_ADVERTISE],
|
||||||
uint64_t speed, Duplex duplex, NetDevPort port);
|
uint64_t speed, Duplex duplex, NetDevPort port);
|
||||||
int ethtool_set_channels(int *ethtool_fd, const char *ifname, netdev_channels *channels);
|
int ethtool_set_channels(int *ethtool_fd, const char *ifname, const netdev_channels *channels);
|
||||||
int ethtool_set_flow_control(int *fd, const char *ifname, int rx, int tx, int autoneg);
|
int ethtool_set_flow_control(int *fd, const char *ifname, int rx, int tx, int autoneg);
|
||||||
|
|
||||||
const char *duplex_to_string(Duplex d) _const_;
|
const char *duplex_to_string(Duplex d) _const_;
|
||||||
|
|
Loading…
Reference in a new issue