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
eb21d0e2
Commit
eb21d0e2
authored
Dec 01, 2007
by
Bernd Eckenfels
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Page aligned fopen buffer
parent
20f0f8e1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
rarp.c
rarp.c
+4
-3
No files found.
rarp.c
View file @
eb21d0e2
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
* that maintains the kernel's RARP cache. It is derived
* that maintains the kernel's RARP cache. It is derived
* from Fred N. van Kempen's arp command.
* from Fred N. van Kempen's arp command.
*
*
* Version: $Id: rarp.c,v 1.
6 2001/04/08 17:05:05 pb
Exp $
* Version: $Id: rarp.c,v 1.
7 2007/12/01 18:51:09 ecki
Exp $
*
*
* Usage: rarp -d hostname Delete entry
* Usage: rarp -d hostname Delete entry
* rarp -s hostname ethernet_address Add entry
* rarp -s hostname ethernet_address Add entry
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#include "net-support.h"
#include "net-support.h"
#include "version.h"
#include "version.h"
#include "pathnames.h"
#include "pathnames.h"
#include "proc.h"
static
char
no_rarp_message
[]
=
N_
(
"This kernel does not support RARP.
\n
"
);
static
char
no_rarp_message
[]
=
N_
(
"This kernel does not support RARP.
\n
"
);
...
@@ -124,7 +125,7 @@ static int rarp_file(int fd, const char *name)
...
@@ -124,7 +125,7 @@ static int rarp_file(int fd, const char *name)
FILE
*
fp
;
FILE
*
fp
;
struct
hostent
*
hp
;
struct
hostent
*
hp
;
if
((
fp
=
fopen
(
name
,
"r"
))
==
NULL
)
{
if
((
fp
=
proc_fopen
(
name
))
==
NULL
)
{
fprintf
(
stderr
,
_
(
"rarp: cannot open file %s:%s.
\n
"
),
name
,
strerror
(
errno
));
fprintf
(
stderr
,
_
(
"rarp: cannot open file %s:%s.
\n
"
),
name
,
strerror
(
errno
));
return
-
1
;
return
-
1
;
}
}
...
@@ -154,7 +155,7 @@ static int rarp_file(int fd, const char *name)
...
@@ -154,7 +155,7 @@ static int rarp_file(int fd, const char *name)
static
int
display_cache
(
void
)
static
int
display_cache
(
void
)
{
{
FILE
*
fd
=
fopen
(
_PATH_PROCNET_RARP
,
"r"
);
FILE
*
fd
=
proc_fopen
(
_PATH_PROCNET_RARP
);
char
buffer
[
256
];
char
buffer
[
256
];
if
(
fd
==
NULL
)
{
if
(
fd
==
NULL
)
{
if
(
errno
==
ENOENT
)
if
(
errno
==
ENOENT
)
...
...
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