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
1124ffb7
Commit
1124ffb7
authored
Mar 14, 2013
by
Stephen Hemminger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ipaddress: minor white space cleanup
Convert leading spaces to tabs, and put alias in one printf
parent
d947b238
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
ip/ipaddress.c
ip/ipaddress.c
+4
-6
No files found.
ip/ipaddress.c
View file @
1124ffb7
...
@@ -96,8 +96,8 @@ static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown)
...
@@ -96,8 +96,8 @@ static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown)
fprintf
(
fp
,
"NO-CARRIER%s"
,
flags
?
","
:
""
);
fprintf
(
fp
,
"NO-CARRIER%s"
,
flags
?
","
:
""
);
flags
&=
~
IFF_RUNNING
;
flags
&=
~
IFF_RUNNING
;
#define _PF(f) if (flags&IFF_##f) { \
#define _PF(f) if (flags&IFF_##f) { \
flags &= ~IFF_##f ; \
flags &= ~IFF_##f ; \
fprintf(fp, #f "%s", flags ? "," : ""); }
fprintf(fp, #f "%s", flags ? "," : ""); }
_PF
(
LOOPBACK
);
_PF
(
LOOPBACK
);
_PF
(
BROADCAST
);
_PF
(
BROADCAST
);
_PF
(
POINTOPOINT
);
_PF
(
POINTOPOINT
);
...
@@ -117,7 +117,7 @@ static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown)
...
@@ -117,7 +117,7 @@ static void print_link_flags(FILE *fp, unsigned flags, unsigned mdown)
_PF
(
DORMANT
);
_PF
(
DORMANT
);
_PF
(
ECHO
);
_PF
(
ECHO
);
#undef _PF
#undef _PF
if
(
flags
)
if
(
flags
)
fprintf
(
fp
,
"%x"
,
flags
);
fprintf
(
fp
,
"%x"
,
flags
);
if
(
mdown
)
if
(
mdown
)
fprintf
(
fp
,
",M-DOWN"
);
fprintf
(
fp
,
",M-DOWN"
);
...
@@ -469,8 +469,7 @@ int print_linkinfo(const struct sockaddr_nl *who,
...
@@ -469,8 +469,7 @@ int print_linkinfo(const struct sockaddr_nl *who,
print_linktype
(
fp
,
tb
[
IFLA_LINKINFO
]);
print_linktype
(
fp
,
tb
[
IFLA_LINKINFO
]);
if
(
do_link
&&
tb
[
IFLA_IFALIAS
])
{
if
(
do_link
&&
tb
[
IFLA_IFALIAS
])
{
fprintf
(
fp
,
"%s"
,
_SL_
);
fprintf
(
fp
,
"%s alias %s"
,
_SL_
,
fprintf
(
fp
,
" alias %s"
,
rta_getattr_str
(
tb
[
IFLA_IFALIAS
]));
rta_getattr_str
(
tb
[
IFLA_IFALIAS
]));
}
}
...
@@ -1425,4 +1424,3 @@ int do_ipaddr(int argc, char **argv)
...
@@ -1425,4 +1424,3 @@ int do_ipaddr(int argc, char **argv)
fprintf
(
stderr
,
"Command
\"
%s
\"
is unknown, try
\"
ip addr help
\"
.
\n
"
,
*
argv
);
fprintf
(
stderr
,
"Command
\"
%s
\"
is unknown, try
\"
ip addr help
\"
.
\n
"
,
*
argv
);
exit
(
-
1
);
exit
(
-
1
);
}
}
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