Merge branch 'main' into next
Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
commit
02c06ffc13
|
|
@ -7,6 +7,7 @@ ifeq ($(HAVE_MNL),y)
|
||||||
|
|
||||||
DEVLINKOBJ = devlink.o mnlg.o
|
DEVLINKOBJ = devlink.o mnlg.o
|
||||||
TARGETS += devlink
|
TARGETS += devlink
|
||||||
|
LDLIBS += -lm
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3743,7 +3743,7 @@ static int cmd_dev_flash_status_cb(const struct nlmsghdr *nlh, void *data)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (total) {
|
if (total) {
|
||||||
pr_out_tty(" %3lu%%", (done * 100) / total);
|
pr_out_tty(" %3"PRIu64"%%", (done * 100) / total);
|
||||||
ctx->last_pc = 1;
|
ctx->last_pc = 1;
|
||||||
} else {
|
} else {
|
||||||
ctx->last_pc = 0;
|
ctx->last_pc = 0;
|
||||||
|
|
@ -3798,7 +3798,7 @@ static void cmd_dev_flash_time_elapsed(struct cmd_dev_flash_status_ctx *ctx)
|
||||||
*/
|
*/
|
||||||
if (!ctx->status_msg_timeout) {
|
if (!ctx->status_msg_timeout) {
|
||||||
len = snprintf(msg, sizeof(msg),
|
len = snprintf(msg, sizeof(msg),
|
||||||
" ( %lum %lus )", elapsed_m, elapsed_s);
|
" ( %"PRIu64"m %"PRIu64"s )", elapsed_m, elapsed_s);
|
||||||
} else if (res.tv_sec <= ctx->status_msg_timeout) {
|
} else if (res.tv_sec <= ctx->status_msg_timeout) {
|
||||||
uint64_t timeout_m, timeout_s;
|
uint64_t timeout_m, timeout_s;
|
||||||
|
|
||||||
|
|
@ -3806,11 +3806,11 @@ static void cmd_dev_flash_time_elapsed(struct cmd_dev_flash_status_ctx *ctx)
|
||||||
timeout_s = ctx->status_msg_timeout % 60;
|
timeout_s = ctx->status_msg_timeout % 60;
|
||||||
|
|
||||||
len = snprintf(msg, sizeof(msg),
|
len = snprintf(msg, sizeof(msg),
|
||||||
" ( %lum %lus : %lum %lus )",
|
" ( %"PRIu64"m %"PRIu64"s : %"PRIu64"m %"PRIu64"s )",
|
||||||
elapsed_m, elapsed_s, timeout_m, timeout_s);
|
elapsed_m, elapsed_s, timeout_m, timeout_s);
|
||||||
} else {
|
} else {
|
||||||
len = snprintf(msg, sizeof(msg),
|
len = snprintf(msg, sizeof(msg),
|
||||||
" ( %lum %lus : timeout reached )", elapsed_m, elapsed_s);
|
" ( %"PRIu64"m %"PRIu64"s : timeout reached )", elapsed_m, elapsed_s);
|
||||||
}
|
}
|
||||||
|
|
||||||
ctx->elapsed_time_msg_len = len;
|
ctx->elapsed_time_msg_len = len;
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
#include <stdint.h>
|
||||||
|
|
||||||
#ifdef HAVE_LIBBSD
|
#ifdef HAVE_LIBBSD
|
||||||
#include <bsd/string.h>
|
#include <bsd/string.h>
|
||||||
|
|
@ -267,7 +268,7 @@ void print_nlmsg_timestamp(FILE *fp, const struct nlmsghdr *n);
|
||||||
unsigned int print_name_and_link(const char *fmt,
|
unsigned int print_name_and_link(const char *fmt,
|
||||||
const char *name, struct rtattr *tb[]);
|
const char *name, struct rtattr *tb[]);
|
||||||
|
|
||||||
#define BIT(nr) (1UL << (nr))
|
#define BIT(nr) (UINT64_C(1) << (nr))
|
||||||
|
|
||||||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
static const char version[] = "5.12.0";
|
static const char version[] = "5.13.0";
|
||||||
|
|
|
||||||
1
lib/fs.c
1
lib/fs.c
|
|
@ -364,4 +364,3 @@ char *get_task_name(pid_t pid)
|
||||||
|
|
||||||
return comm;
|
return comm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@
|
||||||
* libgenl.c GENL library
|
* libgenl.c GENL library
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <errno.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -84,6 +85,7 @@ static int genl_parse_grps(struct rtattr *attr, const char *name, unsigned int *
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
errno = ENOENT;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,17 +110,22 @@ int genl_add_mcast_grp(struct rtnl_handle *grth, __u16 fnum, const char *group)
|
||||||
ghdr = NLMSG_DATA(answer);
|
ghdr = NLMSG_DATA(answer);
|
||||||
len = answer->nlmsg_len;
|
len = answer->nlmsg_len;
|
||||||
|
|
||||||
if (answer->nlmsg_type != GENL_ID_CTRL)
|
if (answer->nlmsg_type != GENL_ID_CTRL) {
|
||||||
|
errno = EINVAL;
|
||||||
goto err_free;
|
goto err_free;
|
||||||
|
}
|
||||||
|
|
||||||
len -= NLMSG_LENGTH(GENL_HDRLEN);
|
len -= NLMSG_LENGTH(GENL_HDRLEN);
|
||||||
if (len < 0)
|
if (len < 0) {
|
||||||
|
errno = EINVAL;
|
||||||
goto err_free;
|
goto err_free;
|
||||||
|
}
|
||||||
|
|
||||||
attrs = (struct rtattr *) ((char *) ghdr + GENL_HDRLEN);
|
attrs = (struct rtattr *) ((char *) ghdr + GENL_HDRLEN);
|
||||||
parse_rtattr(tb, CTRL_ATTR_MAX, attrs, len);
|
parse_rtattr(tb, CTRL_ATTR_MAX, attrs, len);
|
||||||
|
|
||||||
if (tb[CTRL_ATTR_MCAST_GROUPS] == NULL) {
|
if (tb[CTRL_ATTR_MCAST_GROUPS] == NULL) {
|
||||||
|
errno = ENOENT;
|
||||||
fprintf(stderr, "Missing mcast groups TLV\n");
|
fprintf(stderr, "Missing mcast groups TLV\n");
|
||||||
goto err_free;
|
goto err_free;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -251,12 +251,12 @@ ip-link \- network device configuration
|
||||||
.in -8
|
.in -8
|
||||||
|
|
||||||
.ti -8
|
.ti -8
|
||||||
.BI "ip link property add"
|
.BI "ip link property add dev " DEVICE
|
||||||
.RB "[ " altname
|
.RB "[ " altname
|
||||||
.IR NAME " .. ]"
|
.IR NAME " .. ]"
|
||||||
|
|
||||||
.ti -8
|
.ti -8
|
||||||
.BI "ip link property del"
|
.BI "ip link property del dev " DEVICE
|
||||||
.RB "[ " altname
|
.RB "[ " altname
|
||||||
.IR NAME " .. ]"
|
.IR NAME " .. ]"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -343,7 +343,7 @@ and is therefore a useful reference.
|
||||||
Switch to the specified network namespace name.
|
Switch to the specified network namespace name.
|
||||||
.TP
|
.TP
|
||||||
.B \-b, \-\-bpf
|
.B \-b, \-\-bpf
|
||||||
Show socket BPF filters (only administrators are allowed to get these
|
Show socket classic BPF filters (only administrators are allowed to get these
|
||||||
information).
|
information).
|
||||||
.TP
|
.TP
|
||||||
.B \-4, \-\-ipv4
|
.B \-4, \-\-ipv4
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue