]> git.ipfire.org Git - thirdparty/util-linux.git/blobdiff - sys-utils/lscpu.c
lscpu: fix --caches order
[thirdparty/util-linux.git] / sys-utils / lscpu.c
index bc9fe82fc5a6b1ed2356ca267c8a67f74a399239..2cde39846ee8377116359369b21b3bc965f48c30 100644 (file)
@@ -1575,7 +1575,7 @@ print_caches_readable(struct lscpu_desc *desc, int cols[], int ncols,
                        err(EXIT_FAILURE, _("failed to allocate output column"));
        }
 
-       for (i = 0; i < desc->ncaches; i++) {
+       for (i = desc->ncaches - 1; i >= 0; i--) {
                struct cpu_cache *ca = &desc->caches[i];
                struct libscols_line *line;
                int c;