Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
iproute2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
iproute2
Commits
18820bac
Commit
18820bac
authored
May 13, 2016
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into net-next
parents
7fd86a96
c13363e4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
40 deletions
+2
-40
devlink/devlink.c
devlink/devlink.c
+0
-37
misc/ss.c
misc/ss.c
+2
-3
No files found.
devlink/devlink.c
View file @
18820bac
...
@@ -307,23 +307,6 @@ static int ifname_map_lookup(struct dl *dl, const char *ifname,
...
@@ -307,23 +307,6 @@ static int ifname_map_lookup(struct dl *dl, const char *ifname,
return
-
ENOENT
;
return
-
ENOENT
;
}
}
static
int
ifname_map_rev_lookup
(
struct
dl
*
dl
,
const
char
*
bus_name
,
const
char
*
dev_name
,
uint32_t
port_index
,
char
**
p_ifname
)
{
struct
ifname_map
*
ifname_map
;
list_for_each_entry
(
ifname_map
,
&
dl
->
ifname_map_list
,
list
)
{
if
(
strcmp
(
bus_name
,
ifname_map
->
bus_name
)
==
0
&&
strcmp
(
dev_name
,
ifname_map
->
dev_name
)
==
0
&&
port_index
==
ifname_map
->
port_index
)
{
*
p_ifname
=
ifname_map
->
ifname
;
return
0
;
}
}
return
-
ENOENT
;
}
static
unsigned
int
strslashcount
(
char
*
str
)
static
unsigned
int
strslashcount
(
char
*
str
)
{
{
unsigned
int
count
=
0
;
unsigned
int
count
=
0
;
...
@@ -665,26 +648,6 @@ static void pr_out_port_handle(struct nlattr **tb)
...
@@ -665,26 +648,6 @@ static void pr_out_port_handle(struct nlattr **tb)
mnl_attr_get_u32
(
tb
[
DEVLINK_ATTR_PORT_INDEX
]));
mnl_attr_get_u32
(
tb
[
DEVLINK_ATTR_PORT_INDEX
]));
}
}
static
void
__pr_out_port_handle_nice
(
struct
dl
*
dl
,
const
char
*
bus_name
,
const
char
*
dev_name
,
uint32_t
port_index
)
{
char
*
ifname
;
int
err
;
if
(
dl
->
no_nice_names
)
goto
no_nice_names
;
err
=
ifname_map_rev_lookup
(
dl
,
bus_name
,
dev_name
,
port_index
,
&
ifname
);
if
(
err
)
goto
no_nice_names
;
pr_out
(
"%s"
,
ifname
);
return
;
no_nice_names:
__pr_out_port_handle
(
bus_name
,
dev_name
,
port_index
);
}
static
void
pr_out_dev
(
struct
nlattr
**
tb
)
static
void
pr_out_dev
(
struct
nlattr
**
tb
)
{
{
pr_out_handle
(
tb
);
pr_out_handle
(
tb
);
...
...
misc/ss.c
View file @
18820bac
...
@@ -2236,8 +2236,7 @@ struct inet_diag_arg {
...
@@ -2236,8 +2236,7 @@ struct inet_diag_arg {
struct
rtnl_handle
*
rth
;
struct
rtnl_handle
*
rth
;
};
};
static
int
kill_inet_sock
(
const
struct
sockaddr_nl
*
addr
,
static
int
kill_inet_sock
(
struct
nlmsghdr
*
h
,
void
*
arg
)
struct
nlmsghdr
*
h
,
void
*
arg
)
{
{
struct
inet_diag_msg
*
d
=
NLMSG_DATA
(
h
);
struct
inet_diag_msg
*
d
=
NLMSG_DATA
(
h
);
struct
inet_diag_arg
*
diag_arg
=
arg
;
struct
inet_diag_arg
*
diag_arg
=
arg
;
...
@@ -2264,7 +2263,7 @@ static int show_one_inet_sock(const struct sockaddr_nl *addr,
...
@@ -2264,7 +2263,7 @@ static int show_one_inet_sock(const struct sockaddr_nl *addr,
if
(
!
(
diag_arg
->
f
->
families
&
(
1
<<
r
->
idiag_family
)))
if
(
!
(
diag_arg
->
f
->
families
&
(
1
<<
r
->
idiag_family
)))
return
0
;
return
0
;
if
(
diag_arg
->
f
->
kill
&&
kill_inet_sock
(
addr
,
h
,
arg
)
!=
0
)
{
if
(
diag_arg
->
f
->
kill
&&
kill_inet_sock
(
h
,
arg
)
!=
0
)
{
if
(
errno
==
EOPNOTSUPP
||
errno
==
ENOENT
)
{
if
(
errno
==
EOPNOTSUPP
||
errno
==
ENOENT
)
{
/* Socket can't be closed, or is already closed. */
/* Socket can't be closed, or is already closed. */
return
0
;
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment