From 8631c2991c7478441e1fa6b2116ba96703b2a554 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Mon, 5 Jun 2006 13:40:07 +0000 Subject: [PATCH] stuff med printf --- tun.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tun.c b/tun.c index 13ad658..a0d8fdb 100644 --- a/tun.c +++ b/tun.c @@ -59,7 +59,7 @@ open_tun() snprintf(ifreq.ifr_name, IFNAMSIZ, "dns%d", i); if (ioctl(tun_fd, TUNSETIFF, (void *) &ifreq) != -1) { - printf("opened %s\n", ifreq.ifr_name); + printf("Opened %s\n", ifreq.ifr_name); return 0; } @@ -87,8 +87,10 @@ open_tun() for (i = 0; i < TUN_MAX_TRY; i++) { snprintf(tun_name, sizeof(tun_name), "/dev/tun%d", i); - if ((tun_fd = open(tun_name, O_RDWR)) >= 0) + if ((tun_fd = open(tun_name, O_RDWR)) >= 0) { + printf("Opened %s\n", tun_name); return 0; + } if (errno == ENOENT) break;