mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-06 13:17:44 +03:00
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;
|
||||
}
|
||||
|
||||
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 = {
|
||||
.cmd = ETHTOOL_GRINGPARAM
|
||||
};
|
||||
@ -543,7 +543,7 @@ static int set_features_bit(
|
||||
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;
|
||||
struct ethtool_sfeatures *sfeatures;
|
||||
struct ifreq ifr = {};
|
||||
@ -754,7 +754,7 @@ int ethtool_set_glinksettings(
|
||||
int *fd,
|
||||
const char *ifname,
|
||||
int autonegotiation,
|
||||
uint32_t advertise[static N_ADVERTISE],
|
||||
const uint32_t advertise[static N_ADVERTISE],
|
||||
uint64_t speed,
|
||||
Duplex duplex,
|
||||
NetDevPort port) {
|
||||
@ -813,7 +813,7 @@ int ethtool_set_glinksettings(
|
||||
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 = {
|
||||
.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_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_nic_buffer_size(int *ethtool_fd, const char *ifname, netdev_ring_param *ring);
|
||||
int ethtool_set_features(int *ethtool_fd, const char *ifname, int *features);
|
||||
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, const int *features);
|
||||
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);
|
||||
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);
|
||||
|
||||
const char *duplex_to_string(Duplex d) _const_;
|
||||
|
Loading…
Reference in New Issue
Block a user