summaryrefslogtreecommitdiff
path: root/libnm
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-02-23 14:52:00 +0100
committerLubomir Rintel <lkundrak@v3.sk>2018-02-23 19:47:19 +0100
commit8e32d8fc230e593368ee7e5c85005c7b4281d88c (patch)
tree8d509216f54975b016d214681b0ca295c0d691e2 /libnm
parent823839e93378d7efdc5cb25b6dc9a6f9a304ee65 (diff)
downloadNetworkManager-8e32d8fc230e593368ee7e5c85005c7b4281d88c.tar.gz
libnm/utils: split out vendor fixup
The hwdb generally contains the strings of rather poor quality, especially when it comes to sensibly presenting them to the user and they need various cleanups. While the following patches add fixups, this one splits out vendor fixups, because it turns out that a different set of fixups is needed than for products.
Diffstat (limited to 'libnm')
-rw-r--r--libnm/nm-device.c2
-rw-r--r--libnm/nm-libnm-utils.c133
-rw-r--r--libnm/nm-libnm-utils.h3
-rw-r--r--libnm/tests/test-general.c194
4 files changed, 258 insertions, 74 deletions
diff --git a/libnm/nm-device.c b/libnm/nm-device.c
index 5e4c789394..25dd4e7b74 100644
--- a/libnm/nm-device.c
+++ b/libnm/nm-device.c
@@ -1443,7 +1443,7 @@ ensure_description (NMDevice *device)
GParamSpec *name_prop;
gs_free char *short_product = NULL;
- priv->short_vendor = nm_str_realloc (nm_utils_fixup_desc_string (nm_device_get_vendor (device)));
+ priv->short_vendor = nm_str_realloc (nm_utils_fixup_vendor_string (nm_device_get_vendor (device)));
/* Grab device's preferred name, if any */
name_prop = g_object_class_find_property (G_OBJECT_GET_CLASS (G_OBJECT (device)), "name");
diff --git a/libnm/nm-libnm-utils.c b/libnm/nm-libnm-utils.c
index eadaa9398c..9ebbe057d8 100644
--- a/libnm/nm-libnm-utils.c
+++ b/libnm/nm-libnm-utils.c
@@ -25,51 +25,11 @@
/*****************************************************************************/
-char *
-nm_utils_fixup_desc_string (const char *desc)
+static char *
+_fixup_string (const char *desc,
+ const char *const *ignored_phrases,
+ const char *const *ignored_words)
{
- static const char *const IGNORED_PHRASES[] = {
- "Multiprotocol MAC/baseband processor",
- "Wireless LAN Controller",
- "Wireless LAN Adapter",
- "Wireless Adapter",
- "Network Connection",
- "Wireless Cardbus Adapter",
- "Wireless CardBus Adapter",
- "54 Mbps Wireless PC Card",
- "Wireless PC Card",
- "Wireless PC",
- "PC Card with XJACK(r) Antenna",
- "Wireless cardbus",
- "Wireless LAN PC Card",
- "Technology Group Ltd.",
- "Communication S.p.A.",
- "Business Mobile Networks BV",
- "Mobile Broadband Minicard Composite Device",
- "Mobile Communications AB",
- "(PC-Suite Mode)",
- };
- static const char *const IGNORED_WORDS[] = {
- "Semiconductor",
- "Components",
- "Corporation",
- "Communications",
- "Company",
- "Corp.",
- "Corp",
- "Co.",
- "Inc.",
- "Inc",
- "Incorporated",
- "Ltd.",
- "Limited.",
- "Intel?",
- "chipset",
- "adapter",
- "[hex]",
- "NDIS",
- "Module",
- };
char *desc_full;
char *p, *q;
int i;
@@ -96,10 +56,10 @@ nm_utils_fixup_desc_string (const char *desc)
}
/* Attempt to shorten ID by ignoring certain phrases */
- for (i = 0; i < G_N_ELEMENTS (IGNORED_PHRASES); i++) {
- p = strstr (desc_full, IGNORED_PHRASES[i]);
+ for (i = 0; ignored_phrases[i]; i++) {
+ p = strstr (desc_full, ignored_phrases[i]);
if (p) {
- const char *eow = &p[strlen (IGNORED_PHRASES[i])];
+ const char *eow = &p[strlen (ignored_phrases[i])];
/* require that the phrase is delimited by space, or
* at the beginning or end of the description. */
@@ -112,7 +72,7 @@ nm_utils_fixup_desc_string (const char *desc)
/* Attempt to shorten ID by ignoring certain individual words.
* - word-split the description at spaces
* - coalesce multiple spaces
- * - skip over IGNORED_WORDS */
+ * - skip over ignored_words */
p = desc_full;
q = desc_full;
for (;;) {
@@ -131,9 +91,7 @@ nm_utils_fixup_desc_string (const char *desc)
if (eow)
*eow = '\0';
- if (nm_utils_strv_find_first ((char **) IGNORED_WORDS,
- G_N_ELEMENTS (IGNORED_WORDS),
- p) >= 0)
+ if (nm_utils_strv_find_first ((char **) ignored_words, -1, p) >= 0)
goto next;
l = strlen (p);
@@ -157,7 +115,78 @@ next:
return NULL;
}
- nm_assert (g_utf8_validate (desc_full, -1, NULL));
+ return desc_full;
+}
+
+char *
+nm_utils_fixup_vendor_string (const char *desc)
+{
+ static const char *const IGNORED_PHRASES[] = {
+ "Business Mobile Networks BV",
+ "Technology Group Ltd.",
+ NULL,
+ };
+ static const char *const IGNORED_WORDS[] = {
+ "Co.",
+ "Communications",
+ "Components",
+ "Corp.",
+ "Corp",
+ "Corporation",
+ "[hex]",
+ "Inc.",
+ "Inc",
+ "Incorporated",
+ "Limited.",
+ "Ltd.",
+ "Semiconductor",
+ NULL,
+ };
+ char *desc_full;
+
+ desc_full = _fixup_string (desc, IGNORED_PHRASES, IGNORED_WORDS);
+ if (desc_full)
+ nm_assert (g_utf8_validate (desc_full, -1, NULL));
+
+ return desc_full;
+}
+
+char *
+nm_utils_fixup_desc_string (const char *desc)
+{
+ static const char *const IGNORED_PHRASES[] = {
+ "54 Mbps Wireless PC Card",
+ "Communication S.p.A.",
+ "Mobile Broadband Minicard Composite Device",
+ "Mobile Communications AB",
+ "Multiprotocol MAC/baseband processor",
+ "Network Connection",
+ "PC Card with XJACK(r) Antenna",
+ "(PC-Suite Mode)",
+ "Wireless Adapter",
+ "Wireless cardbus",
+ "Wireless Cardbus Adapter",
+ "Wireless CardBus Adapter",
+ "Wireless LAN Adapter",
+ "Wireless LAN Controller",
+ "Wireless LAN PC Card",
+ "Wireless PC",
+ "Wireless PC Card",
+ NULL,
+ };
+ static const char *const IGNORED_WORDS[] = {
+ "adapter",
+ "chipset",
+ "Module",
+ "NDIS",
+ NULL,
+ };
+ char *desc_full;
+
+ desc_full = _fixup_string (desc, IGNORED_PHRASES, IGNORED_WORDS);
+ if (desc_full)
+ nm_assert (g_utf8_validate (desc_full, -1, NULL));
+
return desc_full;
}
diff --git a/libnm/nm-libnm-utils.h b/libnm/nm-libnm-utils.h
index 7af5ba43ef..8582aa32b5 100644
--- a/libnm/nm-libnm-utils.h
+++ b/libnm/nm-libnm-utils.h
@@ -15,7 +15,7 @@
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301 USA.
*
- * Copyright 2017 Red Hat, Inc.
+ * Copyright 2017, 2018 Red Hat, Inc.
*/
#ifndef __NM_LIBNM_UTILS_H__
@@ -25,6 +25,7 @@
#error Cannot use this header.
#endif
+char *nm_utils_fixup_vendor_string (const char *desc);
char *nm_utils_fixup_desc_string (const char *desc);
#endif /* __NM_LIBNM_UTILS_H__ */
diff --git a/libnm/tests/test-general.c b/libnm/tests/test-general.c
index 7e0b7bb740..ac1f3a7e7c 100644
--- a/libnm/tests/test-general.c
+++ b/libnm/tests/test-general.c
@@ -26,33 +26,186 @@
/*****************************************************************************/
+#define T(func, desc, expected) \
+ result = func (desc); \
+ g_assert_cmpstr (result, ==, expected); \
+ g_free (result);
+
static void
-do_test_fixup_desc_string (const char *desc, const char *expected)
+test_fixup_desc_string (void)
{
- gs_free char *result = NULL;
+ char *result = NULL;
- result = nm_utils_fixup_desc_string (desc);
- g_assert_cmpstr (result, ==, expected);
+ T (nm_utils_fixup_desc_string, NULL, NULL);
+ T (nm_utils_fixup_desc_string, "", NULL);
+ T (nm_utils_fixup_desc_string, "a", "a");
+ T (nm_utils_fixup_desc_string, "a b", "a b");
+ T (nm_utils_fixup_desc_string, "a b ", "a b");
+ T (nm_utils_fixup_desc_string, " a bbc ", "a bbc");
+ T (nm_utils_fixup_desc_string, " a \xcc bbc ", "a bbc");
+ T (nm_utils_fixup_desc_string, " a\xcc bbc ", "a bbc");
+ T (nm_utils_fixup_desc_string, " a\xcc""bbc Wireless PC", "a bbc");
+ T (nm_utils_fixup_desc_string, " a\xcc""bbc Wireless PC ", "a bbc");
+ T (nm_utils_fixup_desc_string, " a\xcc""bbcWireless PC ", "a bbcWireless PC");
+ T (nm_utils_fixup_desc_string, " a\xcc""bbc Wireless PCx", "a bbc Wireless PCx");
}
-#define do_test_fixup_desc_string_same(desc) (do_test_fixup_desc_string (""desc"", ""desc""))
-
static void
-test_fixup_desc_string (void)
+test_fixup_vendor_string (void)
{
- do_test_fixup_desc_string (NULL, NULL);
- do_test_fixup_desc_string ("", NULL);
- do_test_fixup_desc_string_same ("a");
- do_test_fixup_desc_string_same ("a b");
- do_test_fixup_desc_string ("a b ", "a b");
- do_test_fixup_desc_string (" a bbc ", "a bbc");
- do_test_fixup_desc_string (" a \xcc bbc ", "a bbc");
- do_test_fixup_desc_string (" a\xcc bbc ", "a bbc");
- do_test_fixup_desc_string (" a\xcc""bbc Wireless PC", "a bbc");
- do_test_fixup_desc_string (" a\xcc""bbc Wireless PC ", "a bbc");
- do_test_fixup_desc_string (" a\xcc""bbcWireless PC ", "a bbcWireless PC");
- do_test_fixup_desc_string (" a\xcc""bbc Wireless PCx", "a bbc Wireless PCx");
- do_test_fixup_desc_string (" a\xcc""bbc Inc Wireless PC ", "a bbc");
+ char *result = NULL;
+
+ T (nm_utils_fixup_vendor_string, "3Com", "3Com");
+ T (nm_utils_fixup_vendor_string, "3Com Corp.", "3Com");
+ T (nm_utils_fixup_vendor_string, "3Com Corporation", "3Com");
+ T (nm_utils_fixup_vendor_string, "Adaptec", "Adaptec");
+ T (nm_utils_fixup_vendor_string, "ADMtek", "ADMtek");
+ T (nm_utils_fixup_vendor_string, "ADMtek, Inc.", "ADMtek");
+ T (nm_utils_fixup_vendor_string, "AEI", "AEI");
+ T (nm_utils_fixup_vendor_string, "Airprime, Incorporated", "Airprime");
+ T (nm_utils_fixup_vendor_string, "AirVast", "AirVast");
+ T (nm_utils_fixup_vendor_string, "Alcatel Telecom", "Alcatel Telecom");
+ T (nm_utils_fixup_vendor_string, "ALi Corp.", "ALi");
+ T (nm_utils_fixup_vendor_string, "Allied Telesis", "Allied Telesis");
+ T (nm_utils_fixup_vendor_string, "AnyDATA Corporation", "AnyDATA");
+ T (nm_utils_fixup_vendor_string, "Apple Inc.", "Apple");
+ T (nm_utils_fixup_vendor_string, "Apple, Inc.", "Apple");
+ T (nm_utils_fixup_vendor_string, "ASUSTek Computer, Inc.", "ASUSTek Computer");
+ T (nm_utils_fixup_vendor_string, "Atheros Communications", "Atheros");
+ T (nm_utils_fixup_vendor_string, "Atheros Communications, Inc.", "Atheros");
+ T (nm_utils_fixup_vendor_string, "AzureWave", "AzureWave");
+ T (nm_utils_fixup_vendor_string, "Belkin", "Belkin");
+ T (nm_utils_fixup_vendor_string, "Belkin Components", "Belkin");
+ T (nm_utils_fixup_vendor_string, "Broadcom Corp.", "Broadcom");
+ T (nm_utils_fixup_vendor_string, "Chelsio Communications Inc", "Chelsio");
+ T (nm_utils_fixup_vendor_string, "CMOTECH Co., Ltd.", "CMOTECH");
+ T (nm_utils_fixup_vendor_string, "Comneon", "Comneon");
+ T (nm_utils_fixup_vendor_string, "Compex", "Compex");
+ T (nm_utils_fixup_vendor_string, "Corega K.K.", "Corega K.K.");
+ T (nm_utils_fixup_vendor_string, "Curitel Communications, Inc.", "Curitel");
+ T (nm_utils_fixup_vendor_string, "Cypress Semiconductor Corp.", "Cypress");
+ T (nm_utils_fixup_vendor_string, "Davicom Semiconductor, Inc.", "Davicom");
+ T (nm_utils_fixup_vendor_string, "Digital Equipment Corporation", "Digital Equipment");
+ T (nm_utils_fixup_vendor_string, "D-Link Corp.", "D-Link");
+ T (nm_utils_fixup_vendor_string, "D-Link System", "D-Link System");
+ T (nm_utils_fixup_vendor_string, "D-Link System Inc", "D-Link System");
+ T (nm_utils_fixup_vendor_string, "DrayTek Corp.", "DrayTek");
+ T (nm_utils_fixup_vendor_string, "d'TV", "d'TV");
+ T (nm_utils_fixup_vendor_string, "DVICO", "DVICO");
+ T (nm_utils_fixup_vendor_string, "Emulex Corporation", "Emulex");
+ T (nm_utils_fixup_vendor_string, "EndPoints, Inc.", "EndPoints");
+ T (nm_utils_fixup_vendor_string, "Entrega [hex]", "Entrega");
+ T (nm_utils_fixup_vendor_string, "Ericsson Business Mobile Networks BV", "Ericsson");
+ T (nm_utils_fixup_vendor_string, "Exar Corp.", "Exar");
+ T (nm_utils_fixup_vendor_string, "Fiberline", "Fiberline");
+ T (nm_utils_fixup_vendor_string, "Fujitsu Limited.", "Fujitsu");
+ T (nm_utils_fixup_vendor_string, "Gateway, Inc.", "Gateway");
+ T (nm_utils_fixup_vendor_string, "Gemtek", "Gemtek");
+ T (nm_utils_fixup_vendor_string, "Genesys Logic, Inc.", "Genesys Logic");
+ T (nm_utils_fixup_vendor_string, "GlobeSpan, Inc.", "GlobeSpan");
+ T (nm_utils_fixup_vendor_string, "Gmate, Inc.", "Gmate");
+ T (nm_utils_fixup_vendor_string, "Guillemot Corp.", "Guillemot");
+ T (nm_utils_fixup_vendor_string, "Hewlett-Packard", "Hewlett-Packard");
+ T (nm_utils_fixup_vendor_string, "Hirose Electric", "Hirose Electric");
+ T (nm_utils_fixup_vendor_string, "Huawei-3Com", "Huawei-3Com");
+ T (nm_utils_fixup_vendor_string, "ICS Advent", "ICS Advent");
+ T (nm_utils_fixup_vendor_string, "Intel Corp.", "Intel");
+ T (nm_utils_fixup_vendor_string, "Intel Corporation", "Intel");
+ T (nm_utils_fixup_vendor_string, "Intellon Corp.", "Intellon");
+ T (nm_utils_fixup_vendor_string, "InterBiometrics", "InterBiometrics");
+ T (nm_utils_fixup_vendor_string, "Intersil Corp.", "Intersil");
+ T (nm_utils_fixup_vendor_string, "Intersil Corporation", "Intersil");
+ T (nm_utils_fixup_vendor_string, "I-O Data Device, Inc.", "I-O Data Device");
+ T (nm_utils_fixup_vendor_string, "Jaton Corp.", "Jaton");
+ T (nm_utils_fixup_vendor_string, "Kawasaki LSI", "Kawasaki LSI");
+ T (nm_utils_fixup_vendor_string, "KTI", "KTI");
+ T (nm_utils_fixup_vendor_string, "LapLink, Inc.", "LapLink");
+ T (nm_utils_fixup_vendor_string, "Lenovo", "Lenovo");
+ T (nm_utils_fixup_vendor_string, "LevelOne", "LevelOne");
+ T (nm_utils_fixup_vendor_string, "Linksys, Inc.", "Linksys");
+ T (nm_utils_fixup_vendor_string, "Linksys", "Linksys");
+ T (nm_utils_fixup_vendor_string, "Lite-On Communications Inc", "Lite-On");
+ T (nm_utils_fixup_vendor_string, "Logitec Corp.", "Logitec");
+ T (nm_utils_fixup_vendor_string, "Logitech, Inc.", "Logitech");
+ T (nm_utils_fixup_vendor_string, "LSI Corporation", "LSI");
+ T (nm_utils_fixup_vendor_string, "Marvell Semiconductor, Inc.", "Marvell");
+ T (nm_utils_fixup_vendor_string, "Marvell Technology Group Ltd.", "Marvell");
+ T (nm_utils_fixup_vendor_string, "MediaTek Inc.", "MediaTek");
+ T (nm_utils_fixup_vendor_string, "Memorex", "Memorex");
+ T (nm_utils_fixup_vendor_string, "Micrel-Kendin", "Micrel-Kendin");
+ T (nm_utils_fixup_vendor_string, "Microsoft Corp.", "Microsoft");
+ T (nm_utils_fixup_vendor_string, "Microsoft Corporation", "Microsoft");
+ T (nm_utils_fixup_vendor_string, "Mobility", "Mobility");
+ T (nm_utils_fixup_vendor_string, "MosChip Semiconductor", "MosChip");
+ T (nm_utils_fixup_vendor_string, "MYRICOM Inc.", "MYRICOM");
+ T (nm_utils_fixup_vendor_string, "National Semiconductor Corporation", "National");
+ T (nm_utils_fixup_vendor_string, "NEC Corp.", "NEC");
+ T (nm_utils_fixup_vendor_string, "Netgear, Inc", "Netgear");
+ T (nm_utils_fixup_vendor_string, "NetGear, Inc.", "NetGear");
+ T (nm_utils_fixup_vendor_string, "Netgear", "Netgear");
+ T (nm_utils_fixup_vendor_string, "Netopia, Inc.", "Netopia");
+ T (nm_utils_fixup_vendor_string, "NetVin", "NetVin");
+ T (nm_utils_fixup_vendor_string, "NetXen Incorporated", "NetXen");
+ T (nm_utils_fixup_vendor_string, "Northern Telecom", "Northern Telecom");
+ T (nm_utils_fixup_vendor_string, "NovaTech", "NovaTech");
+ T (nm_utils_fixup_vendor_string, "Novatel Wireless", "Novatel Wireless");
+ T (nm_utils_fixup_vendor_string, "NVIDIA Corp.", "NVIDIA");
+ T (nm_utils_fixup_vendor_string, "NVIDIA Corporation", "NVIDIA");
+ T (nm_utils_fixup_vendor_string, "Olicom", "Olicom");
+ T (nm_utils_fixup_vendor_string, "OpenMoko, Inc.", "OpenMoko");
+ T (nm_utils_fixup_vendor_string, "Option", "Option");
+ T (nm_utils_fixup_vendor_string, "OQO", "OQO");
+ T (nm_utils_fixup_vendor_string, "Ovislink Corp.", "Ovislink");
+ T (nm_utils_fixup_vendor_string, "Packet Engines Inc.", "Packet Engines");
+ T (nm_utils_fixup_vendor_string, "PEAK System", "PEAK System");
+ T (nm_utils_fixup_vendor_string, "PEGATRON CORPORATION", "PEGATRON CORPORATION");
+ T (nm_utils_fixup_vendor_string, "Planex Communications, Inc", "Planex");
+ T (nm_utils_fixup_vendor_string, "Planex Communications", "Planex");
+ T (nm_utils_fixup_vendor_string, "Planex", "Planex");
+ T (nm_utils_fixup_vendor_string, "PLANEX", "PLANEX");
+ T (nm_utils_fixup_vendor_string, "Portsmith", "Portsmith");
+ T (nm_utils_fixup_vendor_string, "Qcom", "Qcom");
+ T (nm_utils_fixup_vendor_string, "QLogic Corp.", "QLogic");
+ T (nm_utils_fixup_vendor_string, "Qualcomm Atheros Communications", "Qualcomm Atheros");
+ T (nm_utils_fixup_vendor_string, "Qualcomm Atheros", "Qualcomm Atheros");
+ T (nm_utils_fixup_vendor_string, "Qualcomm, Inc.", "Qualcomm");
+ T (nm_utils_fixup_vendor_string, "Quanta Computer, Inc.", "Quanta Computer");
+ T (nm_utils_fixup_vendor_string, "Quantenna Communications, Inc.", "Quantenna");
+ T (nm_utils_fixup_vendor_string, "RDC Semiconductor, Inc.", "RDC");
+ T (nm_utils_fixup_vendor_string, "Realtek Semiconductor Co., Ltd.", "Realtek");
+ T (nm_utils_fixup_vendor_string, "Realtek Semiconductor Corp.", "Realtek");
+ T (nm_utils_fixup_vendor_string, "Red Hat, Inc.", "Red Hat");
+ T (nm_utils_fixup_vendor_string, "Sagem", "Sagem");
+ T (nm_utils_fixup_vendor_string, "Senao", "Senao");
+ T (nm_utils_fixup_vendor_string, "Sharp Corp.", "Sharp");
+ T (nm_utils_fixup_vendor_string, "Sierra Wireless, Inc.", "Sierra Wireless");
+ T (nm_utils_fixup_vendor_string, "Silicom", "Silicom");
+ T (nm_utils_fixup_vendor_string, "Sitecom", "Sitecom");
+ T (nm_utils_fixup_vendor_string, "smartBridges, Inc.", "smartBridges");
+ T (nm_utils_fixup_vendor_string, "SohoWare", "SohoWare");
+ T (nm_utils_fixup_vendor_string, "Solarflare Communications", "Solarflare");
+ T (nm_utils_fixup_vendor_string, "Sony Corp.", "Sony");
+ T (nm_utils_fixup_vendor_string, "SpeedStream", "SpeedStream");
+ T (nm_utils_fixup_vendor_string, "STMicroelectronics", "STMicroelectronics");
+ T (nm_utils_fixup_vendor_string, "Sweex", "Sweex");
+ T (nm_utils_fixup_vendor_string, "SysKonnect", "SysKonnect");
+ T (nm_utils_fixup_vendor_string, "TDK Semiconductor Corp.", "TDK");
+ T (nm_utils_fixup_vendor_string, "Toshiba Corp.", "Toshiba");
+ T (nm_utils_fixup_vendor_string, "TRENDnet", "TRENDnet");
+ T (nm_utils_fixup_vendor_string, "TwinMOS", "TwinMOS");
+ T (nm_utils_fixup_vendor_string, "U.S. Robotics", "U.S. Robotics");
+ T (nm_utils_fixup_vendor_string, "Vaillant", "Vaillant");
+ T (nm_utils_fixup_vendor_string, "VMware", "VMware");
+ T (nm_utils_fixup_vendor_string, "Wavecom", "Wavecom");
+ T (nm_utils_fixup_vendor_string, "Westell", "Westell");
+ T (nm_utils_fixup_vendor_string, "Wilocity Ltd.", "Wilocity");
+ T (nm_utils_fixup_vendor_string, "Winbond", "Winbond");
+ T (nm_utils_fixup_vendor_string, "Wistron NeWeb", "Wistron NeWeb");
+ T (nm_utils_fixup_vendor_string, "Xircom", "Xircom");
+ T (nm_utils_fixup_vendor_string, "Z-Com", "Z-Com");
+ T (nm_utils_fixup_vendor_string, "Zinwell", "Zinwell");
+ T (nm_utils_fixup_vendor_string, "ZyDAS", "ZyDAS");
+ T (nm_utils_fixup_vendor_string, "ZyXEL Communications Corp.", "ZyXEL");
}
/*****************************************************************************/
@@ -64,6 +217,7 @@ int main (int argc, char **argv)
nmtst_init (&argc, &argv, TRUE);
g_test_add_func ("/libnm/general/fixup_desc_string", test_fixup_desc_string);
+ g_test_add_func ("/libnm/general/fixup_vendor_string", test_fixup_vendor_string);
return g_test_run ();
}