findmnt: libsmartcols ASCII art problem [patch]

Bug #1406133 reported by Roman Odaisky
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

The libsmartcols component used by findmnt to draw the filesystem tree is smart enough to wrap lines in case the output doesn’t fit into the screen. However, it fails to draw the lines correctly in this case. Attached patch fixes the problem. Someone more knowledgeable in libsmartcols internals might want to change the buffer size from an arbitrary 1024 to something taken from actual data, the best way to do that eludes me.

Sample of incorrect output:

--%<----
├─/boot /dev/sda1 ext3 rw,relatime,data=ordered
├─/usr /dev/mapper/vgshadow-ubuntu_usr
                                                ext4 rw,noatime,data=ordered
├─/var /dev/mapper/vgshadow-ubuntu_var
                                                ext4 rw,noatime,data=ordered
├─/home /dev/mapper/vgshadow-home
                                                ext4 rw,noatime,data=ordered
└─/srv /dev/mapper/vgshadow-srv
                                                reiserfs rw,noatime,notail
--%<----

Patch adds missing vertical lines at any level necessary.

Tags: patch
Revision history for this message
Roman Odaisky (rdaysky) wrote :
Revision history for this message
Roman Odaisky (rdaysky) wrote :

Attaching full sample of incorrect output in a separate file.

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "libsmartcols-art-fix.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Changed in util-linux (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Martin Pitt (pitti) wrote :
Revision history for this message
Martin Pitt (pitti) wrote :
Changed in util-linux (Ubuntu):
status: New → Fix Committed
Changed in util-linux (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.