mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Huang Ying <ying.huang@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Steven Whitehouse <swhiteho@redhat.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [RFC 1/2] Unified UUID/GUID definition
Date: Wed, 14 Oct 2009 00:01:11 -0700	[thread overview]
Message-ID: <1255503671.1851.43.camel@Joe-Laptop.home> (raw)
In-Reply-To: <1255501805.6047.1192.camel@yhuang-dev.sh.intel.com>

On Wed, 2009-10-14 at 14:30 +0800, Huang Ying wrote:
> There are many different UUID/GUID definitions in kernel, such as that
> in EFI, many file systems, some drivers, etc. Every kernel components
> need UUID/GUID has its own definition. This patch provides a unified
> definition for UUID/GUID.
> 
> UUID is defined via typedef. This makes that UUID appears more like a
> preliminary type, and makes the data type explicit (comparing with
> implicit "u8 uuid[16]").
> 
> The binary representation of UUID/GUID can be little-endian (used by
> EFI, etc) or big-endian (defined by RFC4122), so both is defined.
[]
> +typedef struct {
> +	__u8 b[16];
> +} uuid_le;
> +
> +typedef struct {
> +	__u8 b[16];
> +} uuid_be;

I thought you originally suggested something like:

typedef union {
	u8 b[16];
	struct {
		__be32 time_low;
		__be16 time_mid;
		__be16 time_hi_and_version;
		u8 clock_seq_hi;
		u8 clock_seq_low;
		u8 node[6];
	} v1;
} uuid_be;

typedef union {
	u8 b[16];
	struct {
		__le32 time_low;
		__le16 time_mid;
		__le16 time_hi_and_version;
		u8 clock_seq_hi;
		u8 clock_seq_low;
		u8 node[6];
	} v1;
} uuid_le;



  reply	other threads:[~2009-10-14  7:01 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-14  6:30 Huang Ying
2009-10-14  7:01 ` Joe Perches [this message]
2009-10-14  7:06   ` Huang Ying
2009-10-16  9:03 ` Laurent Pinchart
2009-10-16  9:19   ` Huang Ying

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=1255503671.1851.43.camel@Joe-Laptop.home \
    --to=joe@perches.com \
    --cc=akpm@linux-foundation.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=swhiteho@redhat.com \
    --cc=ying.huang@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®