[parted-devel] problem about function partition_print

Hendrik Brueckner brueckner at linux.vnet.ibm.com
Wed Feb 1 10:10:35 UTC 2017


Hi Phil,

On Tue, Jan 31, 2017 at 02:33:33PM -0500, Phil Susi wrote:
> On 8/17/2016 11:04 PM, Wang Dong wrote:
> > I found the partition_print in do_print is not implemented.
> > And I read the doc and a example is presented. I try to implement it,
> > but I can not figure out the meaning of some data.
> > I wonder if some one can give me some clue about this.
> > 
> > Thanks in advance.
> > 
> > (parted)print 1
> > Minor: 1
> > Flags: boot, lba
> > File System: fat32
> > Size:            945.000Mb (0%)
> > Minimum size:     84.361Mb (0%)
> > Maximum size:   2445.679Mb (100%)
> > 
> > What does this Minimum size and Maximum size mean respectively?
> > 
> > I guess the Maximum size is the capacity of this device, but what about the
> > 
> > Minimum size? And the percent number?
> 
> I'm very confused by your question.  You apparently made those fields up
> ( since right now, parted prints nothing when you ask it to print a
> partition number ), so why are you asking us what they mean?

The "print <num>" (partition_print() in parted.c) is not implemented.
However, Wang, found the following example in the parted.texi file:

	(parted) @kbd{print}
	Disk geometry for /dev/hda: 0.000-2445.679 megabytes
	Disk label type: msdos
	Minor    Start       End     Type      Filesystem  Flags
	1          0.031    945.000  primary   fat32       boot, lba
	2        945.000   2358.562  primary   ext2
	3       2358.562   2445.187  primary   linux-swap
	(parted) @kbd{print 1}
	Minor: 1
	Flags: boot, lba
	File System: fat32
	Size:            945.000Mb (0%)
	Minimum size:     84.361Mb (0%)
	Maximum size:   2445.679Mb (100%)

So the question of Wang relates to the example and what actually the fields
mean.  The maximum size seems to the size of the entire device.  The minimum
size looks something strange, at least, it is difficult to derive them from
the values above.

Because it is just an example, it could simply be that the example is not
correct or misleading, of course, it is not implemented.  So the next question
might be what should "print 1" actually display?

Thanks and kind regards,
  Hendrik




More information about the parted-devel mailing list