Usage example for status-wifi
authorStiletto <blasux@blasux.ru>
Thu, 23 Oct 2014 17:57:20 +0400
changeset 5 e3ee9aa21b1f
parent 4 70b4e0b27e2c
child 6 de6b88d1fa3c
Usage example for status-wifi
status-wifi/wifi.c
--- a/status-wifi/wifi.c	Thu Oct 23 17:55:13 2014 +0400
+++ b/status-wifi/wifi.c	Thu Oct 23 17:57:20 2014 +0400
@@ -10,6 +10,8 @@
 #include <unistd.h>
 #include <iwlib.h>
 
+#include "config.h"
+
 char *eights[] = { "ø", "▁", "▂", "▃", "▄", "▅", "▆","▇", "█" };
 
 char *color_stop;
@@ -28,7 +30,11 @@
 }
 
 int main(int argc, char *argv[]) {
-    assert(argc>1);
+    if (argc<=1) {
+        fprintf(stderr, "Usage: %s <wlan0> [term|pango]\n", argv[0]);
+        fflush(stderr);
+        return 1;
+    }
 
     int skfd;
     if((skfd = iw_sockets_open()) < 0) {