Show either GUID or alias on Windows
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Wed, 3 Feb 2016 15:33:04 +0000 (17:33 +0200)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Wed, 3 Feb 2016 15:33:04 +0000 (17:33 +0200)
ethsock.c

index b85b79e4040351b4bb03665fa2ce55538509aa33..72c2940ae531a03e78597241fbf960dc494c14f8 100644 (file)
--- a/ethsock.c
+++ b/ethsock.c
@@ -444,7 +444,11 @@ int ethsock_list_all(void)
 #ifndef NMRPFLASH_WINDOWS
                printf("%s", dev->name);
 #else
-               printf(NMRPFLASH_ALIAS_PREFIX "%u", dev_num);
+               if (!verbosity) {
+                       printf("%s%u", NMRPFLASH_NETALIAS_PREFIX, dev_num);
+               } else {
+                       printf("%s", dev->name);
+               }
 #endif
 
                for (addr = dev->addresses; addr; addr = addr->next) {
@@ -463,10 +467,6 @@ int ethsock_list_all(void)
                                hwaddr[2], hwaddr[3], hwaddr[4], hwaddr[5]);
 
 #ifdef NMRPFLASH_WINDOWS
-               if (verbosity) {
-                       printf("  %s", dev->name);
-               }
-
                pretty = intf_get_pretty_name(dev->name);
                if (pretty) {
                        printf("  (%s)", pretty);