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: Martin Husemann <martin%duskware.de@localhost>
To: Robert Elz <kre%munnari.OZ.AU@localhost>
Cc: gnats-bugs%netbsd.org@localhost, campbell+netbsd%mumble.net@localhost
Subject: Re: bin/59956: gpt(8): show human-readable units
Date: Wed, 4 Feb 2026 18:32:42 +0100

 On Wed, Feb 04, 2026 at 11:46:13PM +0700, Robert Elz wrote:
 > I agree, that would be better.   Tell me what, in an ideal world, you'd
 > like the format to be (no need for every detail, just what general form
 > would be easiest to parse) and I will add a switch to generate that format.
 
 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).
 
 Like (artificial example, partly derived from your -b output and random
 other things added from a GPT I had handy):
 
 Start:	0
 Size:	1
 Type:	PMBR
 
 Start:	1
 Size:	1
 Type:	Pri GPT header
 GUID:	d1199eac-a57b-4fc8-be13-3bcac7f46bac
 
 Start:	2
 Size:	32
 Type:	Pri GPT table
 
 Index:	1
 Start:	64
 Size:	943718400
 Type:	ffs
 TypeID:	49f48d5a-b10e-11dc-b99b-0019d1879648
 GUID:	60d792d8-59f0-454e-a5d3-cb154da4f88a
 Label:	root
 Attributes:	None
 
 Index:	2
 Start:	524288
 Size:	12058560
 TypeID:	49f48d5a-b10e-11dc-b99b-0019d1879648
 Type:	ffs
 GUID:	d4dbbda3-2ee0-4975-a083-c6bea3ada9cb
 Label:	Backup_Root
 Attributes:	None
 
 
 All fields space or tab separated for use with
 
 	while ((tt = strsep(&t, " \t")) != NULL)
 
 and the values in "Attributes:" comma+space separated for use like
 
 	while ((n = strsep(&val, ", ")) != NULL)
 
 
 I guess you get the idea.
 
 Martin
 


Home | Main Index | Thread Index | Old Index