Hi,
   Here is a patch for 'libsmartcols'  that corrects the "lsblk -M" omission of some newlines.

----------
Description: libsmartcols missing newlines
 The "scols_walk_is_last" function is not always correct,
 it should also test for the end of a group.
Author: Matthijs Melchior <mmelch...@xs4all.nl>
Bug: Debian #1050165; https://github.com/util-linux/util-linux/issues/2446
Last-Update: 2023-09-09
---
--- a/libsmartcols/src/walk.c
+++ b/libsmartcols/src/walk.c
@@ -69,6 +69,8 @@
                }
                if (is_tree_root(parent) && !is_last_tree_root(tb, parent))
                        return 0;
+               if (is_group_child(parent) && !is_last_group_child(parent))
+                       return 0;
        }
        if (is_group_child(ln) && !is_last_group_child(ln))
                return 0;
----------

This has been tested with 'lsblk -M' and the output is now correct.
All the other ls* commands from util-linux have no changes in their output.

Regards,
    Matthijs.

--
------------------------------------------------------
Matthijs Melchior                                Zeist
mmelch...@xs4all.nl                        Netherlands
------------------------------------------------------

Reply via email to