projects
/
framework
/
connectivity
/
connman.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b151e66
)
loopback: Return a More Descriptive Error Code
author
Grant Erickson
<marathon96@gmail.com>
Fri, 15 Jul 2011 17:21:31 +0000
(10:21 -0700)
committer
Marcel Holtmann
<marcel@holtmann.org>
Fri, 15 Jul 2011 20:32:28 +0000
(22:32 +0200)
Return a more descriptive -errno rather than -1 when we fail to create
a socket.
plugins/loopback.c
patch
|
blob
|
history
diff --git
a/plugins/loopback.c
b/plugins/loopback.c
index
6cd5b85
..
ba8f51a
100644
(file)
--- a/
plugins/loopback.c
+++ b/
plugins/loopback.c
@@
-220,7
+220,7
@@
static int setup_loopback(void)
sk = socket(PF_INET, SOCK_DGRAM, 0);
if (sk < 0)
- return -
1
;
+ return -
errno
;
memset(&ifr, 0, sizeof(ifr));
strcpy(ifr.ifr_name, "lo");