summaryrefslogtreecommitdiff
path: root/src/shared/ethtool-util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2021-10-11 13:50:54 +0200
committerLennart Poettering <lennart@poettering.net>2021-10-11 14:10:44 +0200
commit95fe7b28d3ca353b549a1d5d23898743c51b66a7 (patch)
tree754c4d5821ef8180931516aafcacf0c5923951d2 /src/shared/ethtool-util.c
parent7fbae5b7069c67ab203d50a2d8295a4d970f10c5 (diff)
downloadsystemd-95fe7b28d3ca353b549a1d5d23898743c51b66a7.tar.gz
ethtool-util: let's use userspace types in userspace code
Using kernel types __u32 is fine for headers shared by the kernel, but if we define something in userspace and only use it in userspace, in our own .c files, let's stick to userspace fixed-length types.
Diffstat (limited to 'src/shared/ethtool-util.c')
-rw-r--r--src/shared/ethtool-util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/shared/ethtool-util.c b/src/shared/ethtool-util.c
index ee7be4635f..333e5a4879 100644
--- a/src/shared/ethtool-util.c
+++ b/src/shared/ethtool-util.c
@@ -756,7 +756,7 @@ int ethtool_set_features(int *ethtool_fd, const char *ifname, const int features
static int get_glinksettings(int fd, struct ifreq *ifr, struct ethtool_link_usettings **ret) {
struct ecmd {
struct ethtool_link_settings req;
- __u32 link_mode_data[3 * ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32];
+ uint32_t link_mode_data[3 * ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32];
} ecmd = {
.req.cmd = ETHTOOL_GLINKSETTINGS,
};
@@ -857,7 +857,7 @@ static int get_gset(int fd, struct ifreq *ifr, struct ethtool_link_usettings **r
static int set_slinksettings(int fd, struct ifreq *ifr, const struct ethtool_link_usettings *u) {
struct {
struct ethtool_link_settings req;
- __u32 link_mode_data[3 * ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32];
+ uint32_t link_mode_data[3 * ETHTOOL_LINK_MODE_MASK_MAX_KERNEL_NU32];
} ecmd = {};
unsigned offset;