[Bug 259794] diskinfo does not strip trailing spaces from the Disk ident.

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 12 Nov 2021 11:09:21 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=259794

            Bug ID: 259794
           Summary: diskinfo does not strip trailing spaces from the Disk
                    ident.
           Product: Base System
           Version: 12.2-RELEASE
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: tomas@engin.se

Created attachment 229445
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=229445&action=edit
Sample output from diskinfo -v

I noticed this in one of our shell scripts when it suddenly appended
%20%20%20%20 to the glabel. My workaround for the time being is piping the
output to tr -d '[:blank:]' before inserting it into the glabel.

It seems that the Samsung SSD 870 pads the identifier with spaces to make it
equal in length to it's description.

But the point being is that diskinfo in my opinion should strip trailing spaces
(and maybe leading spaces too). This to make the output as clean as it could
be.

And yes, I will make our own scripts clean the input too.

-- 
You are receiving this mail because:
You are the assignee for the bug.