* Improved error output.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@38014 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2010-08-11 11:39:51 +00:00
parent b232302077
commit c968ec1c41
+9 -3
View File
@@ -31,6 +31,10 @@
#include <net80211/ieee80211_ioctl.h>
#include <net80211/ieee80211_haiku.h>
extern const char* __progname;
static const char*
get_string(const char* val, const char* sep, u_int8_t* buf, int* lenp)
{
@@ -100,8 +104,10 @@ set80211(int s, const char* dev, int type, int val, int len, void* data)
ireq.i_val = val;
ireq.i_len = len;
ireq.i_data = data;
if (ioctl(s, SIOCS80211, &ireq, sizeof(struct ieee80211req)) < 0)
printf("%s: error in handling SIOCS80211\n", __func__);
if (ioctl(s, SIOCS80211, &ireq, sizeof(struct ieee80211req)) < 0) {
fprintf(stderr, "%s: error in handling SIOCS80211 (type %d): %s\n",
__progname, type, strerror(errno));
}
}
@@ -259,7 +265,7 @@ show_status(const char* dev, int s)
}
void
static void
usage()
{
fprintf(stderr, "usage: setwep device_path [ssid] [key]\n");