From f72ce0dc37f0b66ba2651b2fe7d39603f089abed Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Thu, 26 Feb 2009 14:58:12 +0000 Subject: moved from %m to %s and strerror --- src/linux/tun.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/linux/tun.c') 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; } -- cgit v1.2.3