[parted-devel] about msdos 2T partition issue
jgranado at redhat.com
Tue Feb 10 14:26:22 UTC 2009
I revisited this issue and conclude that I was very hasty in posting the patch. Xerces is correct, the creation of the msdos partition should be allowed. Its possible, so why not?. What should not be allowed is the creation of a partition inside the msdos label that has length or start values that exceed 2T. Why, because the values used for these partitions would not be the ones given by the user. This is how parted does things ATM, so everything is ok.
I still, however, see that the code that checks if the partition has exceeded its limits, is in libparted/disk.c. I still insist that it should be contained in every label file. Or at least have some sort of variable in each lable that defines the maximum allowable partition size and partition start. In this way, these max values can be called from libparted/disk.c and used in a more general way. Right know we are defining the maximum size and start of an msdos partition in disk.c, that just seems wrong to me.
Comments greatly appreciated. otavio. meyering?
----- "Joel Granados" <jgranado at redhat.com> wrote:
> ----- "xerces8" <xerces8 at butn.net> wrote:
> > Preventing creating a MSDOS labelin a low level tool is wrong IMHO.
> > A GUI can give a warning to the user, but parted should just do what
> > the user tells him too.
> This is a very valid point you make. Actually I am really inclined to
> change the patch a bit and put a interactive warning instead of an
> error. In this way, if you choose to create an msdos label on a disk
> that is greater than the msdos capacity, parted will tell you "be
> msdos label format. (patch on the bottom). IMO reverting the
> > current patch and placing this one
> > > in its place would be the right thing to do because we wont get
> > the point of creating an msdos
> > > partition on a disk if we didn't create an msdos label to begin
> > :). OTH we might come up to
> > > systems that have already made this mistake, in which case we
> > need to tell the user that
> > > no partition can nor will be created.
> > >
> > > If I am missing something please scream at me!!!!
> > >
> > > New Patch:
> > >
> > > --
> > > Joel Andres Granados
> > > Red Hat / Brno Czech Republic
> parted-devel mailing list
> parted-devel at lists.alioth.debian.org
Joel Andres Granados
Red Hat / Brno Czech Republic
More information about the parted-devel