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: Robert Elz <kre%munnari.OZ.AU@localhost>
To: Martin Husemann <martin%duskware.de@localhost>
Cc: gnats-bugs%netbsd.org@localhost, campbell+netbsd%mumble.net@localhost
Subject: Re: bin/59956: gpt(8): show human-readable units
Date: Thu, 05 Feb 2026 01:36:55 +0700
Date: Wed, 4 Feb 2026 18:32:42 +0100
From: Martin Husemann <martin%duskware.de@localhost>
Message-ID: <aYOCuuN0Ok83w01j%big-apple.aprisoft.de@localhost>
| Something very close to the -b format would be fine for -a + new magic
| machine readable switch (plus: make -b use the identical format if the
| new switch is given too).
I can do that, should be easy.
The one thing I worry about however is:
| Label: Backup_Root
Labels are just (UTF16 or whatever it is) text strings.
That means they can contain anything, including newlines, etc.
They can certainly contain spaces, though those alone - even leading
spaces, should be no real problem to handle. But I think we need some
kind of encoding for this (to be properly parsable, rather than just
human readable) to deal with newlines, and other similar junk.
Would perhaps vis encoding the label make sense, or perhaps
even (for this purpose) simply encoding the label as a series
of hex values (of however many bits the chars actually are,
with leading 0's suppressed) ?
Everything else should be no problem (though I see no reason for
using tabs anywhere - except in the label if one is present there)
nor more than a single space between fields (and do you really need
both ',' and ' ' between the attribute names ? ... that's one where
I assume the names are easier to deal with than simply printing the
64 bit field in hex). This is not supposed to be pretty, just easy
for code to read and understand.
I will do all this tomorrow sometime (or rather, later today sometime)
and send you (off list to start with) a sample or three, so you can
determine if it will work for you.
kre
Home |
Main Index |
Thread Index |
Old Index