From a2cd6599d2e27a6cc425a29bc950ef314ede5be7 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Mon, 20 Nov 2023 12:46:59 +0100 Subject: [PATCH] cli: don't print how many more addresses/routes in `nmcli` output Since the number of addresses/routes that the daemon exposes on D-Bus is now limited, we don't know how many more there would be. Just say "more". --- src/nmcli/general.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/nmcli/general.c b/src/nmcli/general.c index df76e9fa08..6fc8184cb0 100644 --- a/src/nmcli/general.c +++ b/src/nmcli/general.c @@ -1458,8 +1458,8 @@ ac_overview(NmCli *nmc, NMActiveConnection *ac) /* Print always at least MAX_ADDRESSES fully. * If there are MAX_ADDRESSES+1 addresses, print them all fully. * If there are more addresses, print MAX_ADDRESSES fully, and a - * "N more" line. */ - nmc_print("\tinet%c ... %u more\n", IS_IPv4 ? '4' : '6', p->len - i - 1u); + * "more" line. */ + nmc_print("\tinet%c ... more\n", IS_IPv4 ? '4' : '6'); break; } } @@ -1474,7 +1474,7 @@ ac_overview(NmCli *nmc, NMActiveConnection *ac) nmc_print("\troute%c %s\n", IS_IPv4 ? '4' : '6', nm_str_buf_get_str(&str)); if (i >= MAX_ROUTES - 1u && p->len - i > 2u) { - nmc_print("\troute%c ... %u more\n", IS_IPv4 ? '4' : '6', p->len - i - 1u); + nmc_print("\troute%c ... more\n", IS_IPv4 ? '4' : '6'); break; } }