linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crda: use strerror() to report error code verbosely
@ 2008-12-23  5:00 Pavel Roskin
  2008-12-23  5:25 ` ath5k: whether "txpower off" is supported ? Xu, Martin
  2008-12-23  5:27 ` [PATCH] crda: use strerror() to report error code verbosely Luis R. Rodriguez
  0 siblings, 2 replies; 16+ messages in thread
From: Pavel Roskin @ 2008-12-23  5:00 UTC (permalink / raw)
  To: linux-wireless, John W Linville

Signed-off-by: Pavel Roskin <proski@gnu.org>
---
 crda.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/crda.c b/crda.c
index afc5df1..fe2766b 100644
--- a/crda.c
+++ b/crda.c
@@ -6,6 +6,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <string.h>
 #include <sys/mman.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -297,7 +298,8 @@ int main(int argc, char **argv)
 	r = nl_send_auto_complete(nlstate.nl_handle, msg);
 
 	if (r < 0) {
-		fprintf(stderr, "Failed to send regulatory request: %d\n", r);
+		fprintf(stderr, "Failed to send regulatory request: %s\n",
+			strerror(-r));
 		goto cb_out;
 	}
 
@@ -309,7 +311,7 @@ int main(int argc, char **argv)
 		r = nl_wait_for_ack(nlstate.nl_handle);
 		if (r < 0) {
 			fprintf(stderr, "Failed to set regulatory domain: "
-				"%d\n", r);
+				"%s\n", strerror(-r));
 			goto cb_out;
 		}
 	}

^ permalink raw reply related	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2008-12-23 15:05 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-23  5:00 [PATCH] crda: use strerror() to report error code verbosely Pavel Roskin
2008-12-23  5:25 ` ath5k: whether "txpower off" is supported ? Xu, Martin
2008-12-23  6:07   ` Luis R. Rodriguez
2008-12-23  5:27 ` [PATCH] crda: use strerror() to report error code verbosely Luis R. Rodriguez
2008-12-23  5:49   ` Pavel Roskin
2008-12-23  5:57     ` Luis R. Rodriguez
2008-12-23  6:20       ` Pavel Roskin
2008-12-23  6:22         ` Luis R. Rodriguez
2008-12-23 14:58           ` Pavel Roskin
2008-12-23 15:03             ` Luis R. Rodriguez
2008-12-23 15:05               ` Luis R. Rodriguez
2008-12-23  8:41         ` Davide Pesavento
2008-12-23 12:14           ` Luis R. Rodriguez
2008-12-23 14:41           ` Pavel Roskin
2008-12-23 14:57             ` Luis R. Rodriguez
2008-12-23 15:03               ` Pavel Roskin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).