All of lore.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Karel Zak <kzak@redhat.com>
Cc: Petr Uzel <petr.uzel@suse.cz>, util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH 1/3] fdisk: add guid
Date: Mon, 24 Sep 2012 13:16:20 +0200	[thread overview]
Message-ID: <1348485380.2456.8.camel@offbook> (raw)
In-Reply-To: <20120924082058.GA22946@x2.net.home>

On Mon, 2012-09-24 at 10:20 +0200, Karel Zak wrote:
> On Fri, Sep 21, 2012 at 11:04:51AM -0400, Davidlohr Bueso wrote:
> > On Fri, Sep 21, 2012 at 04:38:16PM +0200, Karel Zak wrote:
> > > On Fri, Sep 21, 2012 at 09:05:43AM -0400, Davidlohr Bueso wrote:
> > > > I honestly don't see much difference between doing it before or
> > > > after GPT, since all the other labels need to be adapted anyway. 
> > > 
> > >  I see a difference. Why we need struct fdisk_guid in struct where we
> > >  define DOS partition types? Why there is {0} everywhere?
> > >  Do you want to remove all these changes later?
> > 
> > My idea of having a unique systypes structure for all labels is for simplicity.
> > I agree, using {0} isn't the best approach, so it would obviously go out, in favor
> > of the same one the other labels would use. So if DOS doesn't need the GUID it just
> > won't use it (and just call ->type or ->name), but it would still be there for those 
> > that do require it, like GPT.
> 
>  Maybe we can use strings.
> 
>  struct fdisk_parttype {
>     const char *type;           /* UUID, 0xNN, ... */
>     const char *description;    /* help string */
>  };
> 
>  The fdisk dialogs and menus are always based on strings and the final
>  conversion to label specific type (int or GUID) may be done in label
>  specific functions (like add_partition or so).
> 
> > >  It also seems that you're introduce a new hex codes for GPT partition
> > >  types. It means that you want to use int16_t to address types defined
> > >  by UUIDs.  Is it good idea? Would be better to address the types by
> > >  numbers <1-N> as printed in the menu or directly by UUIDs?
> > 
> > True, 1 through N is probably better - I'll look into it. In any case I don't
> > see why we're showing the user (ie: 'l' menu option) hex values, we could easily
> > just show decimal and any number for any partition type. Perhaps I'm missing something
> > about standards, but I clearly remember certain values types, like 'Linux swap' to always
> > be specified by value 82 (hex), which we can see defined in fdisk.h.
> > 
> > So would it be ok to be able to change these values if needed?
> 
>  We have to support the real values for backward compatibility and for
>  extendability -- it should be possible to specify arbitrary
>  UUID. I think the best is to support the both ways
> 
>     - index value <1-N>
>     - real values (hex for DOS, strings for Mac, UUID for GPT, ...)
> 

Ok, I'm a little lost here. What I'm referring to is what we present to
the user for choosing a partition type. Currently we only use hex
values. I don't think we should bother the user with UUIDs here. Maybe
I'm just misreading this.

Thanks.

      parent reply	other threads:[~2012-09-24 11:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-21 12:03 [PATCH 1/3] fdisk: add guid Davidlohr Bueso
2012-09-21 11:12 ` Karel Zak
2012-09-21 11:25   ` Petr Uzel
2012-09-21 13:05   ` Davidlohr Bueso
2012-09-21 14:38     ` Karel Zak
2012-09-21 15:04       ` Davidlohr Bueso
2012-09-24  8:20         ` Karel Zak
2012-09-24  8:43           ` Karel Zak
2012-09-24 11:14             ` Davidlohr Bueso
2012-09-24 11:24             ` Davidlohr Bueso
2012-09-24 11:16           ` Davidlohr Bueso [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1348485380.2456.8.camel@offbook \
    --to=dave@gnu.org \
    --cc=kzak@redhat.com \
    --cc=petr.uzel@suse.cz \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.