projects
/
platform
/
upstream
/
ofono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50d6f2c
)
gatchat: Print error message if opening tun failes
author
Daniel Wagner
<daniel.wagner@bmw-carit.de>
Fri, 24 Aug 2012 12:16:39 +0000
(14:16 +0200)
committer
Denis Kenzior
<denkenz@gmail.com>
Thu, 30 Aug 2012 22:06:09 +0000
(17:06 -0500)
This is a very common mistake. Let's help the users to
configure their system correctly.
gatchat/ppp_net.c
patch
|
blob
|
history
diff --git
a/gatchat/ppp_net.c
b/gatchat/ppp_net.c
index
1609b99
..
813ed9b
100644
(file)
--- a/
gatchat/ppp_net.c
+++ b/
gatchat/ppp_net.c
@@
-155,8
+155,12
@@
struct ppp_net *ppp_net_new(GAtPPP *ppp, int fd)
if (fd < 0) {
/* open a tun interface */
fd = open("/dev/net/tun", O_RDWR);
- if (fd < 0)
+ if (fd < 0) {
+ ppp_debug(ppp, "Couldn't open tun device. "
+ "Do you run oFono as root and do you "
+ "have the TUN module loaded?");
goto error;
+ }
ifr.ifr_flags = IFF_TUN | IFF_NO_PI;
strcpy(ifr.ifr_name, "ppp%d");