projects
/
madwifi
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
edd3220
)
Check the return value of system()
author
Pavel Roskin
<proski@gnu.org>
Wed, 27 Nov 2013 20:14:22 +0000
(15:14 -0500)
committer
Pavel Roskin
<proski@gnu.org>
Wed, 27 Nov 2013 20:14:22 +0000
(15:14 -0500)
tools/wlanconfig.c
patch
|
blob
|
history
diff --git
a/tools/wlanconfig.c
b/tools/wlanconfig.c
index 1c0ff913feb6b9e7965286fb1d34e1c640f1e38e..3ccf0491323560d74c288df30dca3f17a7f03251 100644
(file)
--- a/
tools/wlanconfig.c
+++ b/
tools/wlanconfig.c
@@
-776,7
+776,8
@@
list_keys(const char *ifname)
strcpy(cmd, "iwlist ");
strcat(cmd, ifname);
strcat(cmd, " key");
- system(cmd);
+ if (system(cmd) != 0)
+ puts("Failed!");
}
#define IEEE80211_C_BITS \
@@
-892,7
+893,8
@@
ieee80211_status(const char *ifname)
puts("[status not implemented (yet). Spawning iwconfig...]");
strcpy(cmd, "iwconfig ");
strcat(cmd, ifname);
- system(cmd);
+ if (system(cmd) != 0)
+ puts("Failed!");
}
static int