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".
This commit is contained in:
Thomas Haller
2023-11-20 12:46:59 +01:00
parent 4bb3ad0977
commit a2cd6599d2

View File

@@ -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;
}
}