+ else if (strcasecmp("UARTType", child->key) == 0) {
+#if defined(linux) && !LEGACY_LIBMODBUS && LIBMODBUS_VERSION_CHECK(2, 9, 4)
+ char buffer[NI_MAXHOST];
+ status = cf_util_get_string_buffer(child, buffer, sizeof(buffer));
+ if (status != 0)
+ break;
+ if (strncmp(buffer, "RS485", 6) == 0)
+ host->uarttype = UARTTYPE_RS485;
+ else if (strncmp(buffer, "RS422", 6) == 0)
+ host->uarttype = UARTTYPE_RS422;
+ else if (strncmp(buffer, "RS232", 6) == 0)
+ host->uarttype = UARTTYPE_RS232;
+ else {
+ ERROR("Modbus plugin: The UARTType \"%s\" is unknown.", buffer);
+ status = -1;
+ break;
+ }
+#else
+ ERROR("Modbus plugin: Option `UARTType' not supported. Please "
+ "upgrade libmodbus to at least 2.9.4");
+ return -1;
+#endif
+ } else if (strcasecmp("Interval", child->key) == 0)