diff mbox series

client: use display_table_row for IPv6 in station

Message ID 20240723161817.2191843-1-yuki.utk8g@gmail.com (mailing list archive)
State New
Headers show
Series client: use display_table_row for IPv6 in station | expand

Checks

Context Check Description
tedd_an/pre-ci_am success Success
prestwoj/iwd-alpine-ci-fetch pending fetch SKIP
prestwoj/iwd-alpine-ci-setupell pending Prep - Setup ELL
prestwoj/iwd-alpine-ci-makedistcheck pending makedistcheck SKIP
prestwoj/iwd-alpine-ci-build pending build SKIP
prestwoj/iwd-alpine-ci-incremental_build pending incremental_build SKIP
prestwoj/iwd-alpine-ci-makecheckvalgrind pending makecheckvalgrind SKIP
prestwoj/iwd-alpine-ci-makecheck pending makecheck SKIP
prestwoj/iwd-ci-gitlint fail client: use display_table_row for IPv6 in station 7: B1 Line exceeds max length (83>80): " .................................Station:.wlan0................................" 8: B1 Line exceeds max length (84>80): " --------------------------------------------------------------------------------" 9: B1 Line exceeds max length (85>80): " ..Settable..Property..............Value.........................................." 10: B1 Line exceeds max length (84>80): " --------------------------------------------------------------------------------" 11: B1 Line exceeds max length (87>80): " ............Scanning..............no..............................................." 12: B1 Line exceeds max length (87>80): " ............State.................connected........................................" 13: B1 Line exceeds max length (87>80): " ............Connected.network.....Clannad.Legacy..................................." 14: B1 Line exceeds max length (87>80): " ............IPv4.address..........192.168.1.12....................................." 15: B1 Line exceeds max length (83>80): " ............IPv6.address........fdc3:541d:864f:0:96db:c9ff:fe36:b15............" 16: B1 Line exceeds max length (87>80): " ............ConnectedBss..........cc:d8:43:77:91:0e................................" 20: B1 Line exceeds max length (81>80): "Fixes: 35dd2c08219a (client: update station to use display_table_row, 2022-07-07)"
prestwoj/iwd-ci-fetch success Fetch PR
prestwoj/iwd-ci-setupell success Prep - Setup ELL
prestwoj/iwd-ci-makedistcheck success Make Distcheck
prestwoj/iwd-ci-incremental_build success Incremental build not run PASS
prestwoj/iwd-ci-build success Build - Configure
prestwoj/iwd-ci-makecheck success Make Check
prestwoj/iwd-ci-makecheckvalgrind success Make Check w/Valgrind
prestwoj/iwd-ci-clang success clang PASS
prestwoj/iwd-ci-testrunner success test-runner PASS

Commit Message

Yuki Sireneva July 23, 2024, 4:18 p.m. UTC
IPv6 address entry was not updated to use display_table_row which led to
a shifted line in table, as shown below:

    $ iwctl station wlan0 show | head | sed 's| |.|g'
    .................................Station:.wlan0................................
    --------------------------------------------------------------------------------
    ..Settable..Property..............Value..........................................
    --------------------------------------------------------------------------------
    ............Scanning..............no...............................................
    ............State.................connected........................................
    ............Connected.network.....Clannad.Legacy...................................
    ............IPv4.address..........192.168.1.12.....................................
    ............IPv6.address........fdc3:541d:864f:0:96db:c9ff:fe36:b15............
    ............ConnectedBss..........cc:d8:43:77:91:0e................................

This patch aligns IPv6 address line with other lines in the table.

Fixes: 35dd2c08219a (client: update station to use display_table_row, 2022-07-07)
---
 client/station.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Denis Kenzior July 23, 2024, 11:54 p.m. UTC | #1
Hi Yuki,

On 7/23/24 11:18 AM, Yuki Sireneva wrote:
> IPv6 address entry was not updated to use display_table_row which led to
> a shifted line in table, as shown below:
> 
>      $ iwctl station wlan0 show | head | sed 's| |.|g'
>      .................................Station:.wlan0................................
>      --------------------------------------------------------------------------------
>      ..Settable..Property..............Value..........................................
>      --------------------------------------------------------------------------------
>      ............Scanning..............no...............................................
>      ............State.................connected........................................
>      ............Connected.network.....Clannad.Legacy...................................
>      ............IPv4.address..........192.168.1.12.....................................
>      ............IPv6.address........fdc3:541d:864f:0:96db:c9ff:fe36:b15............
>      ............ConnectedBss..........cc:d8:43:77:91:0e................................
> 
> This patch aligns IPv6 address line with other lines in the table.
> 
> Fixes: 35dd2c08219a (client: update station to use display_table_row, 2022-07-07)
> ---
>   client/station.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 

Applied, thanks.

Regards,
-Denis
diff mbox series

Patch

diff --git a/client/station.c b/client/station.c
index 1d958ef2..16c86dac 100644
--- a/client/station.c
+++ b/client/station.c
@@ -175,8 +175,7 @@  static void display_addresses(const char *device_name)
 				continue;
 
 			have_address = true;
-			display("%s%*s  %-*s%-*s\n", MARGIN, 8, "", 20,
-				"IPv6 address", 47, addrstr);
+			display_table_row(MARGIN, 3, 8, "", 20, "IPv6 address", 47, addrstr);
 		} else if (cur->ifa_addr->sa_family == AF_INET) {
 			struct sockaddr_in *si =
 					(struct sockaddr_in *) cur->ifa_addr;