Bug 241064 - bectl(8): this tool is not able to properly output columns
Summary: bectl(8): this tool is not able to properly output columns
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 12.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: Robert Wing
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-10-04 19:10 UTC by vermaden
Modified: 2020-09-08 19:03 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description vermaden 2019-10-04 19:10:28 UTC
# bectl list
BE   Active Mountpoint Space Created
11.3 -      -          6.18G 2019-09-02 13:18
12.1 NR     /          8.74G 2019-08-01 14:24
safe -      -          1.17G 2019-10-02 23:10

# bectl mount 11.3
successfully mounted 11.3 at /tmp/be_mount.vlYN

# bectl list
BE   Active Mountpoint Space Created
11.3 -      /tmp/be_mount.vlYN         6.18G 2019-09-02 13:18
12.1 NR     /          8.74G 2019-08-01 14:24
safe -      -          1.17G 2019-10-02 23:10
Comment 1 vermaden 2019-10-04 19:11:28 UTC
The beadm(8) output as a working example:

# beadm list
BE   Active Mountpoint          Space Created
12.1 NR     /                    8.7G 2019-08-01 14:24
11.3 -      /tmp/be_mount.vlYN   6.2G 2019-09-02 13:18
safe -      -                    1.2G 2019-10-02 23:10

# beadm umount 11.3
Unmounted successfully

# beadm list            
BE   Active Mountpoint  Space Created
12.1 NR     /            8.7G 2019-08-01 14:24
11.3 -      -            6.2G 2019-09-02 13:18
safe -      -            1.2G 2019-10-02 23:10
Comment 2 Robert Wing freebsd_committer 2020-08-12 19:24:45 UTC
I've created a patch on phabricator, https://reviews.freebsd.org/D26048
Comment 3 commit-hook freebsd_committer 2020-08-19 00:10:32 UTC
A commit references this bug:

Author: rew
Date: Wed Aug 19 00:09:40 UTC 2020
New revision: 364369
URL: https://svnweb.freebsd.org/changeset/base/364369

Log:
  bectl(8): Fix output of `bectl list` for the 'Mountpoint' column.

  Currently, the output of `bectl list` doesn't align the 'Mountpoint' column
  correctly when the 'mounted' property of a boot environment dataset is longer
  than the default column width.

  Set the 'Mountpoint' column width to the boot environment dataset with the
  longest 'mounted' property or to the default width, whichever is greater.

  PR:             241064
  Reported by:	vermaden@interia.pl
  Reviewed by:    kevans (mentor)
  Approved by:    kevans (mentor)
  MFC after:      1 week
  Differential Revision:	https://reviews.freebsd.org/D26048

Changes:
  head/sbin/bectl/bectl_list.c
Comment 4 commit-hook freebsd_committer 2020-09-08 07:38:15 UTC
A commit references this bug:

Author: rew
Date: Tue Sep  8 07:37:45 UTC 2020
New revision: 365448
URL: https://svnweb.freebsd.org/changeset/base/365448

Log:
  MFC r364369:

  bectl(8): Fix output of 'bectl list' for the 'Mountpoint' column.

  PR: 241064

Changes:
_U  stable/12/
  stable/12/sbin/bectl/bectl_list.c