1*4882a593Smuzhiyun /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 2*4882a593Smuzhiyun /* 3*4882a593Smuzhiyun * UUID/GUID definition 4*4882a593Smuzhiyun * 5*4882a593Smuzhiyun * Copyright (C) 2010, Intel Corp. 6*4882a593Smuzhiyun * Huang Ying <ying.huang@intel.com> 7*4882a593Smuzhiyun * 8*4882a593Smuzhiyun * This program is free software; you can redistribute it and/or 9*4882a593Smuzhiyun * modify it under the terms of the GNU General Public License version 10*4882a593Smuzhiyun * 2 as published by the Free Software Foundation; 11*4882a593Smuzhiyun * 12*4882a593Smuzhiyun * This program is distributed in the hope that it will be useful, 13*4882a593Smuzhiyun * but WITHOUT ANY WARRANTY; without even the implied warranty of 14*4882a593Smuzhiyun * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15*4882a593Smuzhiyun * GNU General Public License for more details. 16*4882a593Smuzhiyun */ 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun #ifndef _UAPI_LINUX_UUID_H_ 19*4882a593Smuzhiyun #define _UAPI_LINUX_UUID_H_ 20*4882a593Smuzhiyun 21*4882a593Smuzhiyun #include <linux/types.h> 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun typedef struct { 24*4882a593Smuzhiyun __u8 b[16]; 25*4882a593Smuzhiyun } guid_t; 26*4882a593Smuzhiyun 27*4882a593Smuzhiyun #define GUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ 28*4882a593Smuzhiyun ((guid_t) \ 29*4882a593Smuzhiyun {{ (a) & 0xff, ((a) >> 8) & 0xff, ((a) >> 16) & 0xff, ((a) >> 24) & 0xff, \ 30*4882a593Smuzhiyun (b) & 0xff, ((b) >> 8) & 0xff, \ 31*4882a593Smuzhiyun (c) & 0xff, ((c) >> 8) & 0xff, \ 32*4882a593Smuzhiyun (d0), (d1), (d2), (d3), (d4), (d5), (d6), (d7) }}) 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun /* backwards compatibility, don't use in new code */ 35*4882a593Smuzhiyun typedef guid_t uuid_le; 36*4882a593Smuzhiyun #define UUID_LE(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) \ 37*4882a593Smuzhiyun GUID_INIT(a, b, c, d0, d1, d2, d3, d4, d5, d6, d7) 38*4882a593Smuzhiyun #define NULL_UUID_LE \ 39*4882a593Smuzhiyun UUID_LE(0x00000000, 0x0000, 0x0000, 0x00, 0x00, 0x00, 0x00, \ 40*4882a593Smuzhiyun 0x00, 0x00, 0x00, 0x00) 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun #endif /* _UAPI_LINUX_UUID_H_ */ 43