Drop support for localisation.
[tinc] / src / bsd / device.c
index be026b7..4dd2b57 100644 (file)
@@ -79,7 +79,7 @@ bool setup_device(void) {
                else if(!strcasecmp(type, "tap"))
                        device_type = DEVICE_TYPE_TAP;
                else {
-                       logger(LOG_ERR, _("Unknown device type %s!"), type);
+                       logger(LOG_ERR, "Unknown device type %s!", type);
                        return false;
                }
        } else {
@@ -100,7 +100,7 @@ bool setup_device(void) {
        }
 
        if(device_fd < 0) {
-               logger(LOG_ERR, _("Could not open %s: %s"), device, strerror(errno));
+               logger(LOG_ERR, "Could not open %s: %s", device, strerror(errno));
                return false;
        }
 
@@ -112,7 +112,7 @@ bool setup_device(void) {
                {       
                        const int zero = 0;
                        if(ioctl(device_fd, TUNSIFHEAD, &zero, sizeof zero) == -1) {
-                               logger(LOG_ERR, _("System call `%s' failed: %s"), "ioctl", strerror(errno));
+                               logger(LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno));
                                return false;
                        }
                }
@@ -124,14 +124,14 @@ bool setup_device(void) {
                }
 #endif
 
-                       device_info = _("Generic BSD tun device");
+                       device_info = "Generic BSD tun device";
                        break;
                case DEVICE_TYPE_TUNIFHEAD:
 #ifdef TUNSIFHEAD
                {
                        const int one = 1;
                        if(ioctl(device_fd, TUNSIFHEAD, &one, sizeof one) == -1) {
-                               logger(LOG_ERR, _("System call `%s' failed: %s"), "ioctl", strerror(errno));
+                               logger(LOG_ERR, "System call `%s' failed: %s", "ioctl", strerror(errno));
                                return false;
                        }
                }
@@ -143,21 +143,21 @@ bool setup_device(void) {
                }
 #endif
 
-                       device_info = _("Generic BSD tun device");
+                       device_info = "Generic BSD tun device";
                        break;
                case DEVICE_TYPE_TAP:
                        if(routing_mode == RMODE_ROUTER)
                                overwrite_mac = true;
-                       device_info = _("Generic BSD tap device");
+                       device_info = "Generic BSD tap device";
                        break;
 #ifdef HAVE_TUNEMU
                case DEVICE_TYPE_TUNEMU:
-                       device_info = _("BSD tunemu device");
+                       device_info = "BSD tunemu device";
                        break;
 #endif
        }
 
-       logger(LOG_INFO, _("%s is a %s"), device, device_info);
+       logger(LOG_INFO, "%s is a %s", device, device_info);
 
        return true;
 }
@@ -192,7 +192,7 @@ bool read_packet(vpn_packet_t *packet) {
 #endif
 
                        if(lenin <= 0) {
-                               logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info,
+                               logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,
                                           device, strerror(errno));
                                return false;
                        }
@@ -221,7 +221,7 @@ bool read_packet(vpn_packet_t *packet) {
                        struct iovec vector[2] = {{&type, sizeof(type)}, {packet->data + 14, MTU - 14}};
 
                        if((lenin = readv(device_fd, vector, 2)) <= 0) {
-                               logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info,
+                               logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,
                                           device, strerror(errno));
                                return false;
                        }
@@ -250,7 +250,7 @@ bool read_packet(vpn_packet_t *packet) {
 
                case DEVICE_TYPE_TAP:
                        if((lenin = read(device_fd, packet->data, MTU)) <= 0) {
-                               logger(LOG_ERR, _("Error while reading from %s %s: %s"), device_info,
+                               logger(LOG_ERR, "Error while reading from %s %s: %s", device_info,
                                           device, strerror(errno));
                                return false;
                        }
@@ -264,7 +264,7 @@ bool read_packet(vpn_packet_t *packet) {
                
        device_total_in += packet->len;
 
-       ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Read packet of %d bytes from %s"),
+       ifdebug(TRAFFIC) logger(LOG_DEBUG, "Read packet of %d bytes from %s",
                           packet->len, device_info);
 
        logger(LOG_INFO, "E:fd_read");
@@ -272,13 +272,13 @@ bool read_packet(vpn_packet_t *packet) {
 }
 
 bool write_packet(vpn_packet_t *packet) {
-       ifdebug(TRAFFIC) logger(LOG_DEBUG, _("Writing packet of %d bytes to %s"),
+       ifdebug(TRAFFIC) logger(LOG_DEBUG, "Writing packet of %d bytes to %s",
                           packet->len, device_info);
 
        switch(device_type) {
                case DEVICE_TYPE_TUN:
                        if(write(device_fd, packet->data + 14, packet->len - 14) < 0) {
-                               logger(LOG_ERR, _("Error while writing to %s %s: %s"), device_info,
+                               logger(LOG_ERR, "Error while writing to %s %s: %s", device_info,
                                           device, strerror(errno));
                                return false;
                        }
@@ -300,13 +300,13 @@ bool write_packet(vpn_packet_t *packet) {
                                        break;
                                default:
                                        ifdebug(TRAFFIC) logger(LOG_ERR,
-                                                          _("Unknown address family %x while writing packet to %s %s"),
+                                                          "Unknown address family %x while writing packet to %s %s",
                                                           af, device_info, device);
                                        return false;
                        }
 
                        if(writev(device_fd, vector, 2) < 0) {
-                               logger(LOG_ERR, _("Can't write to %s %s: %s"), device_info, device,
+                               logger(LOG_ERR, "Can't write to %s %s: %s", device_info, device,
                                           strerror(errno));
                                return false;
                        }
@@ -315,7 +315,7 @@ bool write_packet(vpn_packet_t *packet) {
                        
                case DEVICE_TYPE_TAP:
                        if(write(device_fd, packet->data, packet->len) < 0) {
-                               logger(LOG_ERR, _("Error while writing to %s %s: %s"), device_info,
+                               logger(LOG_ERR, "Error while writing to %s %s: %s", device_info,
                                           device, strerror(errno));
                                return false;
                        }
@@ -324,7 +324,7 @@ bool write_packet(vpn_packet_t *packet) {
 #ifdef HAVE_TUNEMU
                case DEVICE_TYPE_TUNEMU:
                        if(tunemu_write(device_fd, packet->data + 14, packet->len - 14) < 0) {
-                               logger(LOG_ERR, _("Error while writing to %s %s: %s"), device_info,
+                               logger(LOG_ERR, "Error while writing to %s %s: %s", device_info,
                                           device, strerror(errno));
                                return false;
                        }
@@ -341,7 +341,7 @@ bool write_packet(vpn_packet_t *packet) {
 }
 
 void dump_device_stats(void) {
-       logger(LOG_DEBUG, _("Statistics for %s %s:"), device_info, device);
-       logger(LOG_DEBUG, _(" total bytes in:  %10d"), device_total_in);
-       logger(LOG_DEBUG, _(" total bytes out: %10d"), device_total_out);
+       logger(LOG_DEBUG, "Statistics for %s %s:", device_info, device);
+       logger(LOG_DEBUG, " total bytes in:  %10d", device_total_in);
+       logger(LOG_DEBUG, " total bytes out: %10d", device_total_out);
 }