Merge branch 'main' into next

Signed-off-by: David Ahern <dsahern@kernel.org>
This commit is contained in:
David Ahern 2021-07-01 14:29:42 +00:00
commit 02c06ffc13
8 changed files with 20 additions and 12 deletions

View File

@ -7,6 +7,7 @@ ifeq ($(HAVE_MNL),y)
DEVLINKOBJ = devlink.o mnlg.o
TARGETS += devlink
LDLIBS += -lm
endif

View File

@ -3743,7 +3743,7 @@ static int cmd_dev_flash_status_cb(const struct nlmsghdr *nlh, void *data)
}
}
if (total) {
pr_out_tty(" %3lu%%", (done * 100) / total);
pr_out_tty(" %3"PRIu64"%%", (done * 100) / total);
ctx->last_pc = 1;
} else {
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) {
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) {
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;
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);
} else {
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;

View File

@ -8,6 +8,7 @@
#include <stdlib.h>
#include <stdbool.h>
#include <time.h>
#include <stdint.h>
#ifdef HAVE_LIBBSD
#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,
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]))

View File

@ -1 +1 @@
static const char version[] = "5.12.0";
static const char version[] = "5.13.0";

View File

@ -364,4 +364,3 @@ char *get_task_name(pid_t pid)
return comm;
}

View File

@ -3,6 +3,7 @@
* libgenl.c GENL library
*/
#include <errno.h>
#include <stdio.h>
#include <stdlib.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;
}
@ -108,17 +110,22 @@ int genl_add_mcast_grp(struct rtnl_handle *grth, __u16 fnum, const char *group)
ghdr = NLMSG_DATA(answer);
len = answer->nlmsg_len;
if (answer->nlmsg_type != GENL_ID_CTRL)
if (answer->nlmsg_type != GENL_ID_CTRL) {
errno = EINVAL;
goto err_free;
}
len -= NLMSG_LENGTH(GENL_HDRLEN);
if (len < 0)
if (len < 0) {
errno = EINVAL;
goto err_free;
}
attrs = (struct rtattr *) ((char *) ghdr + GENL_HDRLEN);
parse_rtattr(tb, CTRL_ATTR_MAX, attrs, len);
if (tb[CTRL_ATTR_MCAST_GROUPS] == NULL) {
errno = ENOENT;
fprintf(stderr, "Missing mcast groups TLV\n");
goto err_free;
}

View File

@ -251,12 +251,12 @@ ip-link \- network device configuration
.in -8
.ti -8
.BI "ip link property add"
.BI "ip link property add dev " DEVICE
.RB "[ " altname
.IR NAME " .. ]"
.ti -8
.BI "ip link property del"
.BI "ip link property del dev " DEVICE
.RB "[ " altname
.IR NAME " .. ]"

View File

@ -343,7 +343,7 @@ and is therefore a useful reference.
Switch to the specified network namespace name.
.TP
.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).
.TP
.B \-4, \-\-ipv4