summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2023-06-28 08:20:57 -0700
committerStephen Hemminger <stephen@networkplumber.org>2023-06-28 08:20:57 -0700
commit5e72cc73eb36342efff3de6ac4bcc2fa7a76d465 (patch)
tree19a100bc812165bf5da556e0478093b45fe8c527 /lib
parent43388c729de3124d30ccd39e1e616ed30a1e2477 (diff)
parent5295b8f38e31fd077e3d130161912b2a66789426 (diff)
Merge git://git.kernel.org/pub/scm/network/iproute2/iproute2-next
Diffstat (limited to 'lib')
-rw-r--r--lib/fs.c2
-rw-r--r--lib/ll_proto.c1
-rw-r--r--lib/ll_types.c8
3 files changed, 6 insertions, 5 deletions
diff --git a/lib/fs.c b/lib/fs.c
index 7f4b159c..622f28b3 100644
--- a/lib/fs.c
+++ b/lib/fs.c
@@ -41,7 +41,7 @@ static int name_to_handle_at(int dirfd, const char *pathname,
struct file_handle *handle, int *mount_id, int flags)
{
return syscall(__NR_name_to_handle_at, dirfd, pathname, handle,
- mount_id, flags);
+ mount_id, flags);
}
static int open_by_handle_at(int mount_fd, struct file_handle *handle, int flags)
diff --git a/lib/ll_proto.c b/lib/ll_proto.c
index 526e582f..5aacb5b4 100644
--- a/lib/ll_proto.c
+++ b/lib/ll_proto.c
@@ -78,6 +78,7 @@ __PF(8021AD,802.1ad)
__PF(MPLS_UC,mpls_uc)
__PF(MPLS_MC,mpls_mc)
__PF(TEB,teb)
+__PF(CFM,cfm)
{ 0x8100, "802.1Q" },
{ 0x88cc, "LLDP" },
diff --git a/lib/ll_types.c b/lib/ll_types.c
index 20183ad6..69141ade 100644
--- a/lib/ll_types.c
+++ b/lib/ll_types.c
@@ -108,10 +108,10 @@ __PF(VOID, void)
#undef __PF
unsigned int i;
- for (i = 0; !numeric && i < ARRAY_SIZE(arphrd_names); i++) {
- if (arphrd_names[i].type == type)
+ for (i = 0; !numeric && i < ARRAY_SIZE(arphrd_names); i++) {
+ if (arphrd_names[i].type == type)
return arphrd_names[i].name;
}
- snprintf(buf, len, "[%d]", type);
- return buf;
+ snprintf(buf, len, "[%d]", type);
+ return buf;
}