Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
wr-switch-sw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
white-rabbit
wr-switch-sw
Commits
f649f3bf
Commit
f649f3bf
authored
Nov 22, 2014
by
Alessandro Rubini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
userspace/hal: trivial: error reporting
Signed-off-by:
Alessandro Rubini
<
rubini@gnudd.com
>
parent
8d87a820
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
hal_ports.c
userspace/wrsw_hal/hal_ports.c
+5
-2
No files found.
userspace/wrsw_hal/hal_ports.c
View file @
f649f3bf
...
...
@@ -6,6 +6,7 @@
#include <string.h>
#include <stdint.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
...
...
@@ -214,9 +215,11 @@ int hal_port_init_all()
/* Open a single raw socket for accessing the MAC addresses, etc. */
hal_port_fd
=
socket
(
AF_PACKET
,
SOCK_DGRAM
,
0
);
if
(
hal_port_fd
<
0
)
if
(
hal_port_fd
<
0
)
{
fprintf
(
stderr
,
"%s: Can't create socket: %s
\n
"
,
__func__
,
strerror
(
errno
));
return
-
1
;
}
/* Count the number of physical WR network interfaces */
hal_port_nports
=
0
;
for
(
i
=
0
;
i
<
HAL_MAX_PORTS
;
i
++
)
{
...
...
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