On 08/10/18 03:09, Sebastian Benoit wrote:
i know about the tab in ieee80211_listnodes()

but your diffs are unreadable, please fix that.

sorry about that. I blame thunderbird.

Index: ifconfig.c
===================================================================
RCS file: /cvs/src/sbin/ifconfig/ifconfig.c,v
retrieving revision 1.362
diff -u -p -u -r1.362 ifconfig.c
--- ifconfig.c    27 Feb 2018 22:32:26 -0000    1.362
+++ ifconfig.c    11 Aug 2018 01:27:39 -0000
@@ -793,9 +793,13 @@ main(int argc, char *argv[])
                 } else
                     noarg = 0;

-                if (noarg == 0)
-                    (*p->c_func)(NULL, 0);
-                else
+                if (noarg == 0) {
+                    if (strcmp(p->c_name, "scan") == 0) {
+                        (*p->c_func)(NULL, 0);
+                        goto done;
+                    } else
+                        (*p->c_func)(NULL, 0);
+                } else
                     goto nextarg;
             } else if (p->c_parameter == NEXTARG) {
 nextarg:
@@ -863,6 +867,7 @@ nextarg:
         if (ioctl(s, rafp->af_aifaddr, rafp->af_addreq) < 0)
             err(1, "SIOCAIFADDR");
     }
+done:
     return (0);
 }

@@ -1994,9 +1999,7 @@ setifchan(const char *val, int d)
 void
 setifscan(const char *val, int d)
 {
-    if (shownet80211chans || shownet80211nodes)
-        usage();
-    shownet80211nodes = 1;
+    return(ieee80211_listnodes());
 }

 #ifndef SMALL
@@ -2201,7 +2204,6 @@ ieee80211_status(void)
         putchar(' ');
         printb_status(ifr.ifr_flags, IEEE80211_F_USERBITS);
     }
-
     putchar('\n');
     if (shownet80211chans)
         ieee80211_listchans();
@@ -2288,7 +2290,7 @@ ieee80211_listnodes(void)
         qsort(nr, na.na_nodes, sizeof(*nr), rssicmp);

     for (i = 0; i < na.na_nodes; i++) {
-        printf("\t\t");
+        printf("\t");
         ieee80211_printnode(&nr[i]);
         putchar('\n');
     }

Reply via email to