* [PATCH wpan-tools 0/2] Some wpan-tools fixes and upcoming 0.7 release @ 2016-09-14 12:03 Stefan Schmidt 2016-09-14 12:03 ` [PATCH wpan-tools 1/2] info: remove confusing supported commands printout Stefan Schmidt 2016-09-14 12:03 ` [PATCH wpan-tools 2/2] info: pretty print tx powers output Stefan Schmidt 0 siblings, 2 replies; 3+ messages in thread From: Stefan Schmidt @ 2016-09-14 12:03 UTC (permalink / raw) To: linux-wpan; +Cc: Alexander Aring, Stefan Schmidt Hello. These are two pending fixes I have sitting around for wpan-tools. We are planning to have a 0.7 release soon. So far the major addition is network namespaces support. If you have anything else pending please let us know quickly so we can see if it should still go into 0.7 or wait for the next release. Stefan Schmidt (2): info: remove confusing supported commands printout info: pretty print tx powers output src/info.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) regards Stefan Schmidt -- 2.5.5 ^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH wpan-tools 1/2] info: remove confusing supported commands printout 2016-09-14 12:03 [PATCH wpan-tools 0/2] Some wpan-tools fixes and upcoming 0.7 release Stefan Schmidt @ 2016-09-14 12:03 ` Stefan Schmidt 2016-09-14 12:03 ` [PATCH wpan-tools 2/2] info: pretty print tx powers output Stefan Schmidt 1 sibling, 0 replies; 3+ messages in thread From: Stefan Schmidt @ 2016-09-14 12:03 UTC (permalink / raw) To: linux-wpan; +Cc: Alexander Aring, Stefan Schmidt This is confusing for the user as it used the raw netlink names and might not match the help output we print. If we want to query the kernel for available commands to display them we need to spent more energy to print it out understandable. Fixes #8 Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com> --- src/info.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/info.c b/src/info.c index 69f37f9..b06093b 100644 --- a/src/info.c +++ b/src/info.c @@ -472,16 +472,6 @@ static int print_phy_handler(struct nl_msg *msg, void *arg) } } } - - if (tb_msg[NL802154_ATTR_SUPPORTED_COMMANDS]) { - struct nlattr *nl_cmd; - int rem_cmd; - - printf("Supported commands:\n"); - nla_for_each_nested(nl_cmd, tb_msg[NL802154_ATTR_SUPPORTED_COMMANDS], rem_cmd) - printf("\t* %s\n", command_name(nla_get_u32(nl_cmd))); - } - return 0; } -- 2.5.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH wpan-tools 2/2] info: pretty print tx powers output 2016-09-14 12:03 [PATCH wpan-tools 0/2] Some wpan-tools fixes and upcoming 0.7 release Stefan Schmidt 2016-09-14 12:03 ` [PATCH wpan-tools 1/2] info: remove confusing supported commands printout Stefan Schmidt @ 2016-09-14 12:03 ` Stefan Schmidt 1 sibling, 0 replies; 3+ messages in thread From: Stefan Schmidt @ 2016-09-14 12:03 UTC (permalink / raw) To: linux-wpan; +Cc: Alexander Aring, Stefan Schmidt Add unit, some spacing and break lines to make the output easier to understand and read. Fixes #7 Signed-off-by: Stefan Schmidt <stefan@osg.samsung.com> --- src/info.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/info.c b/src/info.c index b06093b..9261454 100644 --- a/src/info.c +++ b/src/info.c @@ -372,11 +372,18 @@ static int print_phy_handler(struct nl_msg *msg, void *arg) if (tb_caps[NL802154_CAP_ATTR_TX_POWERS]) { int rem_pwrs; + int counter = 0; struct nlattr *nl_pwrs; printf("\ttx_powers: "); - nla_for_each_nested(nl_pwrs, tb_caps[NL802154_CAP_ATTR_TX_POWERS], rem_pwrs) - printf("%.3g,", MBM_TO_DBM(nla_get_s32(nl_pwrs))); + nla_for_each_nested(nl_pwrs, tb_caps[NL802154_CAP_ATTR_TX_POWERS], rem_pwrs) { + if (counter % 6 == 0) { + printf("\n\t\t\t%.3g dBM, ", MBM_TO_DBM(nla_get_s32(nl_pwrs))); + } else { + printf("%.3g dBM, ", MBM_TO_DBM(nla_get_s32(nl_pwrs))); + } + counter++; + } /* TODO */ printf("\b \n"); } -- 2.5.5 ^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-09-14 12:13 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-09-14 12:03 [PATCH wpan-tools 0/2] Some wpan-tools fixes and upcoming 0.7 release Stefan Schmidt 2016-09-14 12:03 ` [PATCH wpan-tools 1/2] info: remove confusing supported commands printout Stefan Schmidt 2016-09-14 12:03 ` [PATCH wpan-tools 2/2] info: pretty print tx powers output Stefan Schmidt
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.