summaryrefslogtreecommitdiff
path: root/src/linux/tun.c
diff options
context:
space:
mode:
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;
}