From: Wolfgang Denk Date: Fri, 14 Mar 2014 17:12:29 +0100 Subject: [U-Boot] [PATCH v3 2/3] lib: uuid: add functions to generate UUID version 4 In-Reply-To: References: <5ef7cdb8df4fb05c3c371e29d7a61e28e1563a68.1394807506.git.p.marczak@samsung.com> <72629ef58556732156fadf26a2a48be85704f224.1393600504.git.p.marczak@samsung.com> Message-ID: <20140314161229.2891638018C@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Przemyslaw Marczak, In message you wrote: > This patch adds support to generate UUID (Universally Unique Identifier) > in version 4 based on RFC4122, which is randomly. > > Source: https://www.ietf.org/rfc/rfc4122.txt ... > +#define UUID_BIN_LEN 16 ... > +struct uuid { > + unsigned int time_low; > + unsigned short time_mid; > + unsigned short time_hi_and_version; > + unsigned char clock_seq_hi_and_reserved; > + unsigned char clock_seq_low; > + unsigned char node[6]; > +} __packed; Maybe we should define UUID_BIN_LEN as sizeof(struct uuid) ? Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de To the systems programmer, users and applications serve only to provide a test load.