Re: [PATCH 1/3] fdisk: add guid

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Sep 21, 2012 at 01:12:53PM +0200, Karel Zak wrote:
> On Tue, Aug 21, 2012 at 02:03:14PM +0200, Davidlohr Bueso wrote:
> >  fdisks/cfdisk.c         |    2 +-
> >  fdisks/common.h         |   16 ++++-
> >  fdisks/fdiskbsdlabel.h  |   38 +++++-----
> >  fdisks/fdisksgilabel.c  |   38 +++++-----
> >  fdisks/fdisksunlabel.c  |   34 ++++----
> >  fdisks/i386_sys_types.c |  198 +++++++++++++++++++++++-----------------------
> >  6 files changed, 169 insertions(+), 157 deletions(-)
> [....]
> > +
> > +/* Globally unique identifier */
> > +struct fdisk_guid {
> > +	uint32_t   time_low;
> > +	uint16_t   time_mid;
> > +	uint16_t   time_hi_and_version;
> > +	uint8_t    clock_seq_hi;
> > +	uint8_t    clock_seq_low;
> > +	uint8_t    node[6];
> > +};
> >  
> >  struct systypes {
> > -	unsigned char type;
> > -	char *name;
> > +	uint16_t          type;
> > +	struct fdisk_guid guid;
> > +	const char        *name;
> >  };
> 
> I don't like this hack. On all places in fdisk where we need systypes
> is available fdisk_context struct where is ideal place to store label
> specific stuff (ideally by any label specific function in fdisk_label).

I'd say that creating label specific info in fdisk_context and moving
such stuff there would be the next step. Doing it the other way round
(which I agree would be nicer) would mean quite a lot of work given
what we have now. Would it help if we extended this patchset with
requested label specific stuff (and related cleanup) ?


Petr

-- 
Petr Uzel
IRC: ptr_uzl @ freenode

Attachment: pgpJdyto2URMv.pgp
Description: PGP signature


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux