linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: linux-wireless@vger.kernel.org, John W Linville <linville@tuxdriver.com>
Subject: [PATCH] crda: use strerror() to report error code verbosely
Date: Tue, 23 Dec 2008 00:00:07 -0500	[thread overview]
Message-ID: <20081223050006.3710.98311.stgit@ct.roinet.com> (raw)

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;
 		}
 	}

             reply	other threads:[~2008-12-23  5:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23  5:00 Pavel Roskin [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081223050006.3710.98311.stgit@ct.roinet.com \
    --to=proski@gnu.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).