NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/59956: gpt(8): show human-readable units



The following reply was made to PR bin/59956; it has been noted by GNATS.

From: kre%munnari.OZ.AU@localhost
To: kre%munnari.OZ.AU@localhost, martin%duskware.de@localhost
Cc: campbell+netbsd%mumble.net@localhost, gnats-bugs%netbsd.org@localhost
Subject: Re: bin/59956: gpt(8): show human-readable units
Date: Thu, 5 Feb 2026 02:53:30 +0700 (+07)

     Date: Wed, 4 Feb 2026 19:44:32 +0100
     From: Martin Husemann <martin%duskware.de@localhost>
     Subject: Re: bin/59956: gpt(8): show human-readable units
 
   | I would just print all printable characters in the current locale
   | and ignore all else.
 
 We could do that, if you don't plan on using the name for anything
 other than display during install then it should be OK, but if you're
 going to ...
 
   | If the result does not fit in a WEDGE=... line
   | in /etc/fstab later, things will break.
 
 then that wouldn't work, as the abbreviated wedge name would never
 fit.   The truly weird ones are unlikely to get used there however,
 more likely (except if someone is just attempting to break things)
 would be for them to come from some other unknown system with which
 NetBSD is sharing a drive.   All we'd need to do is ignore them.  But
 the output cotaining them still needs to be properly parsed.
 
 But even with 100% NetBSD there can be partition names never used
 anywhere except in GPT - eg: the partitions used for an autoconfigured
 raidframe.   That can be set up initially using dkN names, then
 just autoconfig itself forever after.   The label just says what it
 is being used for, more precisely than "some random raid component".
 
   | If you prefer to encode, indeed vis(1)/vis(3) is quite convenient.
 
 My only reservation with those is that I'm not sure how well they work
 with wider than 8 bit characters - we can encode the UTF-8 encoding,
 which is what I think we mostly operate upon now though I guess.
 
   | No that, is not really needed - just what the exiting code accepts
   | and trivial to adjust.
 
 I don't think that should be an issue, no spaces, just commas, between
 attributes should be able to be parsed the same way, just the ' '
 delimiter won't ever happen.
 
 kre
 


Home | Main Index | Thread Index | Old Index