summaryrefslogtreecommitdiff
path: root/src/linux/tun.c
diff options
context:
space:
mode:
authorChristian Pointner <equinox@anytun.org>2009-02-26 14:58:12 +0000
committerChristian Pointner <equinox@anytun.org>2009-02-26 14:58:12 +0000
commitf72ce0dc37f0b66ba2651b2fe7d39603f089abed (patch)
tree2facf10a91a09dbe5af9282639bfdaa98f98130f /src/linux/tun.c
parentadded -4 and -6 switches to udp socket (diff)
moved from %m to %s and strerror
Diffstat (limited to 'src/linux/tun.c')
-rw-r--r--src/linux/tun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/linux/tun.c b/src/linux/tun.c
index 87cc815..c2187a6 100644
--- a/src/linux/tun.c
+++ b/src/linux/tun.c
@@ -64,7 +64,7 @@ int tun_init(tun_device_t* dev, const char* dev_name, const char* dev_type, cons
dev->fd_ = open(DEFAULT_DEVICE, O_RDWR);
if(dev->fd_ < 0) {
- log_printf(ERROR, "can't open device file (%s): %m", DEFAULT_DEVICE);
+ log_printf(ERROR, "can't open device file (%s): %s", DEFAULT_DEVICE, strerror(errno));
tun_close(dev);
return -1;
}
@@ -94,7 +94,7 @@ int tun_init(tun_device_t* dev, const char* dev_name, const char* dev_type, cons
} else if(!ioctl(dev->fd_, (('T' << 8) | 202), &ifr)) {
dev->actual_name_ = strdup(ifr.ifr_name);
} else {
- log_printf(ERROR, "tun/tap device ioctl failed: %m");
+ log_printf(ERROR, "tun/tap device ioctl failed: %s", strerror(errno));
tun_close(dev);
return -1;
}