findmnt: libsmartcols ASCII art problem [patch]

Bug #1406133 reported by Roman Odaisky on 2014-12-28
This bug affects 1 person
Affects Status Importance Assigned to Milestone
util-linux (Ubuntu)

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.

Roman Odaisky (rdaysky) wrote :
Roman Odaisky (rdaysky) wrote :

Attaching full sample of incorrect output in a separate file.

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
Martin Pitt (pitti) wrote :
Martin Pitt (pitti) wrote :
Changed in util-linux (Ubuntu):
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers