[PATCH] Better error reporting, printing PDA

Pavel Roskin proski at gnu.org
Mon Aug 4 16:09:31 EDT 2003


Hello!

Here are some minor fixes for the utilities that I put together because
they are trivial.

Errors in ioctl calls are reported by perror with the name on the ioctl,
but there are two cases when the name of the ioctl is not printed.

Also, "hostap_diag -a" is supposed to print all information, but it
doesn't print the PDA.

-- 
Regards,
Pavel Roskin
-------------- next part --------------
--- utils/hostap_crypt_conf.c
+++ utils/hostap_crypt_conf.c
@@ -191,7 +191,7 @@ static int do_ioctl(const char *dev, str
 
 	if (ioctl(s, PRISM2_IOCTL_HOSTAPD, &iwr) < 0) {
 		if (show_err) {
-			perror("ioctl");
+			perror("ioctl[PRISM2_IOCTL_HOSTAPD]");
 			show_error(param);
 		}
 		return -1;
--- utils/hostap_diag.c
+++ utils/hostap_diag.c
@@ -938,6 +938,7 @@ int main(int argc, char *argv[])
 			show_known_rids = 1;
 			show_unknown_rids = 1;
 			show_bbp = 1;
+			show_pda = 1;
 		} else if (c == 'b')
 			show_bbp = 1;
 		else if (c == 'h')
--- utils/util.c
+++ utils/util.c
@@ -172,7 +172,7 @@ int hostapd_ioctl(const char *dev, struc
 		close(s);
 		ret = errno;
 		if (show_err) 
-			perror("ioctl");
+			perror("ioctl[PRISM2_IOCTL_HOSTAPD]");
 		return ret;
 	}
 	close(s);


More information about the HostAP mailing list