Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
net-tools
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
net-tools
Commits
9bea556f
Commit
9bea556f
authored
Nov 19, 1998
by
Klaas Freitag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some cosmetic fixes to program error messages.
parent
0bd8e37b
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
ifconfig.c
ifconfig.c
+8
-5
No files found.
ifconfig.c
View file @
9bea556f
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* that either displays or sets the characteristics of
* that either displays or sets the characteristics of
* one or more of the system's networking interfaces.
* one or more of the system's networking interfaces.
*
*
* Version: $Id: ifconfig.c,v 1.2
0 1998/11/18 13:46:11 philip
Exp $
* Version: $Id: ifconfig.c,v 1.2
1 1998/11/19 06:36:57 freitag
Exp $
*
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* and others. Copyright 1993 MicroWalt Corporation
* and others. Copyright 1993 MicroWalt Corporation
...
@@ -380,7 +380,8 @@ static int set_flag(char *ifname, short flag)
...
@@ -380,7 +380,8 @@ static int set_flag(char *ifname, short flag)
strcpy
(
ifr
.
ifr_name
,
ifname
);
strcpy
(
ifr
.
ifr_name
,
ifname
);
if
(
ioctl
(
skfd
,
SIOCGIFFLAGS
,
&
ifr
)
<
0
)
{
if
(
ioctl
(
skfd
,
SIOCGIFFLAGS
,
&
ifr
)
<
0
)
{
fprintf
(
stderr
,
_
(
"%s: unknown interface.
\n
"
),
ifname
);
fprintf
(
stderr
,
_
(
"%s: unknown interface: %s
\n
"
),
ifname
,
strerror
(
errno
));
return
(
-
1
);
return
(
-
1
);
}
}
strcpy
(
ifr
.
ifr_name
,
ifname
);
strcpy
(
ifr
.
ifr_name
,
ifname
);
...
@@ -400,7 +401,8 @@ static int clr_flag(char *ifname, short flag)
...
@@ -400,7 +401,8 @@ static int clr_flag(char *ifname, short flag)
strcpy
(
ifr
.
ifr_name
,
ifname
);
strcpy
(
ifr
.
ifr_name
,
ifname
);
if
(
ioctl
(
skfd
,
SIOCGIFFLAGS
,
&
ifr
)
<
0
)
{
if
(
ioctl
(
skfd
,
SIOCGIFFLAGS
,
&
ifr
)
<
0
)
{
fprintf
(
stderr
,
_
(
"%s: unknown interface.
\n
"
),
ifname
);
fprintf
(
stderr
,
_
(
"%s: unknown interface: %s
\n
"
),
ifname
,
strerror
(
errno
));
return
-
1
;
return
-
1
;
}
}
strcpy
(
ifr
.
ifr_name
,
ifname
);
strcpy
(
ifr
.
ifr_name
,
ifname
);
...
@@ -501,6 +503,7 @@ int main(int argc, char **argv)
...
@@ -501,6 +503,7 @@ int main(int argc, char **argv)
perror
(
"socket"
);
perror
(
"socket"
);
exit
(
1
);
exit
(
1
);
}
}
/* Find any options. */
/* Find any options. */
argc
--
;
argc
--
;
argv
++
;
argv
++
;
...
@@ -1077,7 +1080,7 @@ int main(int argc, char **argv)
...
@@ -1077,7 +1080,7 @@ int main(int argc, char **argv)
#endif
#endif
default:
default:
fprintf
(
stderr
,
fprintf
(
stderr
,
_
(
"Don't know how to set addresses for
this family.
\n
"
)
);
_
(
"Don't know how to set addresses for
family %d.
\n
"
),
ap
->
af
);
exit
(
1
);
exit
(
1
);
}
}
if
(
r
<
0
)
{
if
(
r
<
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