From: Alexander Aring <alex.aring@gmail.com>
To: linux-wpan@vger.kernel.org
Cc: kernel@pengutronix.de, Alexander Aring <alex.aring@gmail.com>
Subject: [PATCH wpan-tools 2/3] info: fix tx power printout
Date: Wed, 27 May 2015 12:25:04 +0200 [thread overview]
Message-ID: <1432722305-22460-2-git-send-email-alex.aring@gmail.com> (raw)
In-Reply-To: <1432722305-22460-1-git-send-email-alex.aring@gmail.com>
This patch uses the format string "%.3g" instead "%.2g" for current
tx power value. This is the same format string like we use to printout
all supported tx power values.
Signed-off-by: Alexander Aring <alex.aring@gmail.com>
---
src/info.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/info.c b/src/info.c
index b74442d..79b101e 100644
--- a/src/info.c
+++ b/src/info.c
@@ -95,7 +95,7 @@ static int print_phy_handler(struct nl_msg *msg, void *arg)
}
if (tb_msg[NL802154_ATTR_TX_POWER])
- printf("tx_power: %.2g\n", MBM_TO_DBM(nla_get_s32(tb_msg[NL802154_ATTR_TX_POWER])));
+ printf("tx_power: %.3g\n", MBM_TO_DBM(nla_get_s32(tb_msg[NL802154_ATTR_TX_POWER])));
if (tb_msg[NL802154_ATTR_WPAN_PHY_CAPS]) {
struct nlattr *tb_caps[NL802154_CAP_ATTR_MAX + 1];
--
2.4.1
next prev parent reply other threads:[~2015-05-27 10:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-27 10:25 [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing Alexander Aring
2015-05-27 10:25 ` Alexander Aring [this message]
2015-05-27 10:33 ` [PATCH wpan-tools 2/3] info: fix tx power printout Varka Bhadram
2015-05-27 10:25 ` [PATCH wpan-tools 3/3] info: add support for cca ed level info Alexander Aring
2015-05-27 10:35 ` Varka Bhadram
2015-05-27 10:33 ` [PATCH wpan-tools 1/3] phy: fix cca ed level parameter parsing Varka Bhadram
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=1432722305-22460-2-git-send-email-alex.aring@gmail.com \
--to=alex.aring@gmail.com \
--cc=kernel@pengutronix.de \
--cc=linux-wpan@vger.kernel.org \
/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