Skip to content
Commit 1f4f0a4b authored by Mike Fleetwood's avatar Mike Fleetwood Committed by Curtis Gedak
Browse files

Show too wide Mount Point column with ellipsis (#771693)

openSUSE 42.1 with default btrfs root installation is heavily using
subvolumes.  (Think of btrfs as a storage pool and subvolumes as
individual file systems within the pool for a rough approximation).
Thus the root partition is mounted on many mount points:

    # df -k
    Filesystem     1K-blocks    Used Available Use% Mounted on
    ...
    /dev/sda2       19445760 5820080  13157104  31% /
    /dev/sda2       19445760 5820080  13157104  31% /var/lib/libvirt/images
    /dev/sda2       19445760 5820080  13157104  31% /var/lib/mysql
    /dev/sda2       19445760 5820080  13157104  31% /.snapshots
    /dev/sda2       19445760 5820080  13157104  31% /home
    /dev/sda2       19445760 5820080  13157104  31% /var/opt
    /dev/sda2       19445760 5820080  13157104  31% /usr/local
    /dev/sda2       19445760 5820080  13157104  31% /var/tmp
    /dev/sda2       19445760 5820080  13157104  31% /var/lib/named
    /dev/sda2       19445760 5820080  13157104  31% /var/lib/mariadb
    /dev/sda2       19445760 5820080  13157104  31% /var/spool
    /dev/sda2       19445760 5820080  13157104  31% /var/lib/pgsql
    /dev/sda2       19445760 5820080  13157104  31% /var/lib/mailman
    /dev/sda2       19445760 5820080  13157104  31% /srv
    /dev/sda2       19445760 5820080  13157104  31% /opt
    /dev/sda2       19445760 5820080  13157104  31% /var/crash
    /dev/sda2       19445760 5820080  13157104  31% /tmp
    /dev/sda2       19445760 5820080  13157104  31% /boot/grub2/i386-pc
    /dev/sda2       19445760 5820080  13157104  31% /var/log
    /dev/sda2       19445760 5820080  13157104  31% /boot/grub2/x86_64-efi

As the Mount Point column contains all 20 mount points it makes the
column wider than the screen, requiring lots of horizontal scrolling to
see the following columns.  (Truncated to just 7 mounts in this
example here).

    Partition     | File System | Mount Point
      /dev/sda1 * | # swap      |
      /dev/sda2 * | # btrfs     | /, /.snapshots, /boot/grub2/i386-pc, /boot/grub2/x86_64-efi, /home, /opt, /srv

Fix by making the Mount Point column resizable and display truncated
text with ellipsis.  The column now takes the initial and minimum width
from the width of the "Mount Point" column header text.

    Partition     | File System | Mount Point     |   Size
      /dev/sda1 * | # swap      |                 |  1.45 GiB
      /dev/sda2 * | # btrfs     | /, /.snapsho... | 18.54 GiB

Bug 771693 - Mount Point column is wider than the screen on openSUSE
             using btrfs root with lots of mounted subvolumes
parent 85b68587
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment