linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] iw: fix output qualifier for unsigned values
@ 2009-08-17 10:46 Arnd Hannemann
  2009-08-17 10:58 ` Johannes Berg
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Hannemann @ 2009-08-17 10:46 UTC (permalink / raw)
  To: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 353 bytes --]

Hi,

with 0.9.16 a "iw wlan0 station dump" gives the following output:

Station XX:XX:XX:XX:XX:XX (on wlan0)
	inactive time:	4 ms
	rx bytes:	-1611945626
	rx packets:	7643414
	tx bytes:	1527923993
	tx packets:	4829428
	signal:  	-63 dBm
	tx bitrate:	54.0 MBit/s


Seems to be the output qualifier %d is used wrongly in some cases.
This patch fixes that.

[-- Attachment #2: iw_use_unsigned.patch --]
[-- Type: text/x-patch, Size: 1198 bytes --]

Signed-off-by: Arnd Hannemann <hannemann@nets.rwth-aachen.de>

diff -Naur iw-0.9.16.orig/station.c iw-0.9.16/station.c
--- iw-0.9.16.orig/station.c	2009-08-16 16:03:36.000000000 +0200
+++ iw-0.9.16/station.c	2009-08-17 12:31:58.119502558 +0200
@@ -80,19 +80,19 @@
 	printf("Station %s (on %s)", mac_addr, dev);
 
 	if (sinfo[NL80211_STA_INFO_INACTIVE_TIME])
-		printf("\n\tinactive time:\t%d ms",
+		printf("\n\tinactive time:\t%u ms",
 			nla_get_u32(sinfo[NL80211_STA_INFO_INACTIVE_TIME]));
 	if (sinfo[NL80211_STA_INFO_RX_BYTES])
-		printf("\n\trx bytes:\t%d",
+		printf("\n\trx bytes:\t%u",
 			nla_get_u32(sinfo[NL80211_STA_INFO_RX_BYTES]));
 	if (sinfo[NL80211_STA_INFO_RX_PACKETS])
-		printf("\n\trx packets:\t%d",
+		printf("\n\trx packets:\t%u",
 			nla_get_u32(sinfo[NL80211_STA_INFO_RX_PACKETS]));
 	if (sinfo[NL80211_STA_INFO_TX_BYTES])
-		printf("\n\ttx bytes:\t%d",
+		printf("\n\ttx bytes:\t%u",
 			nla_get_u32(sinfo[NL80211_STA_INFO_TX_BYTES]));
 	if (sinfo[NL80211_STA_INFO_TX_PACKETS])
-		printf("\n\ttx packets:\t%d",
+		printf("\n\ttx packets:\t%u",
 			nla_get_u32(sinfo[NL80211_STA_INFO_TX_PACKETS]));
 	if (sinfo[NL80211_STA_INFO_SIGNAL])
 		printf("\n\tsignal:  \t%d dBm",

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

* Re: [PATCH] iw: fix output qualifier for unsigned values
  2009-08-17 10:46 [PATCH] iw: fix output qualifier for unsigned values Arnd Hannemann
@ 2009-08-17 10:58 ` Johannes Berg
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Berg @ 2009-08-17 10:58 UTC (permalink / raw)
  To: Arnd Hannemann; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

On Mon, 2009-08-17 at 12:46 +0200, Arnd Hannemann wrote:

> Seems to be the output qualifier %d is used wrongly in some cases.
> This patch fixes that.

Applied, thanks, but please CC me in the future as explained in the
README file.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

end of thread, other threads:[~2009-08-17 10:58 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-17 10:46 [PATCH] iw: fix output qualifier for unsigned values Arnd Hannemann
2009-08-17 10:58 ` Johannes Berg

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).