aboutsummaryrefslogtreecommitdiff
path: root/example
diff options
context:
space:
mode:
authorStuart Haslam <stuart.haslam@linaro.org>2015-08-05 16:24:09 +0100
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-08-06 15:38:05 +0300
commit021867cb973eff62495196c1f7f4db70c8dc0358 (patch)
tree4e9de70757c0cc636acd2de723750f0e4e67b08c /example
parentc02fbd7221acea2f40f76fafafff0e12181637d1 (diff)
example: classifier: resolve text alignment issues
When the string containing the number of packets processed by one of the queues gets for be longer than a tab the alignment is messed up and the fields overlap with part of a previous value. Signed-off-by: Stuart Haslam <stuart.haslam@linaro.org> Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'example')
-rw-r--r--example/classifier/odp_classifier.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/example/classifier/odp_classifier.c b/example/classifier/odp_classifier.c
index b55a6f9d..6d6dd59b 100644
--- a/example/classifier/odp_classifier.c
+++ b/example/classifier/odp_classifier.c
@@ -122,7 +122,7 @@ void print_cls_statistics(appl_args_t *args)
printf("-");
printf("\n");
for (i = 0; i < args->policy_count; i++)
- printf("%s\t", args->stats[i].queue_name);
+ printf("%-12s ", args->stats[i].queue_name);
printf("Total Packets");
printf("\n");
@@ -135,17 +135,19 @@ void print_cls_statistics(appl_args_t *args)
for (; timeout > 0 || infinite; timeout--) {
for (i = 0; i < args->policy_count; i++)
- printf("%"PRIu64"\t",
+ printf("%-12" PRIu64 " ",
odp_atomic_load_u64(&args->stats[i]
.packet_count));
- printf("\t%"PRIu64"\t", odp_atomic_load_u64(&args->
- total_packets));
+ printf("%-" PRIu64, odp_atomic_load_u64(&args->
+ total_packets));
sleep(1);
printf("\r");
fflush(stdout);
}
+
+ printf("\n");
}
static inline