From c3d1cda177612a3a8a2f1b35da73a69eea0507e7 Mon Sep 17 00:00:00 2001 From: darkcoven Date: Tue, 8 Apr 2014 19:28:53 +0200 Subject: [PATCH] Cli: align fields in switch list --- cli/src/common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/src/common.c b/cli/src/common.c index f7a0acb..6fe12ed 100644 --- a/cli/src/common.c +++ b/cli/src/common.c @@ -114,10 +114,10 @@ void displaySwitchTab (const struct swi_attr *sa, int nb) return; } - printf("Num\tMac\t\t\tProduct\t\tName\t\t\tIP\t\tPorts\tFirmware\n"); + printf("Num\tMac\t\t\tProduct\t\t\tName\t\t\t\t\tIP\t\tPorts\tFirmware\n"); for (i = 0; i < nb; i++) - printf("%i\t%s\t%s\t%s\t\t%s\t%i\t%s\n", i, ether_ntoa(&sa[i].mac), sa[i].product, sa[i].name, inet_ntoa(sa[i].nc.ip), sa[i].ports, sa[i].firmware); + printf("% 3d\t%-17s\t%-16.16s\t%-32.32s\t%-15s\t% 5d\t%s\n", i, ether_ntoa(&sa[i].mac), sa[i].product, sa[i].name, inet_ntoa(sa[i].nc.ip), sa[i].ports, sa[i].firmware); printf("\nfound %i switch(es)\n", nb); } -- 2.39.5