diff options
author | Labun, Marcin <Marcin.Labun@intel.com> | 2011-03-10 01:45:15 +0100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2011-03-10 01:45:15 +0100 |
commit | 1a90147116b680f9d5b93c82c4b96f28a7bf5645 (patch) | |
tree | 20fea1333060983dd40f063e9099307d10015431 /platform-intel.h | |
parent | update of imsm_orom structure (diff) | |
download | mdadm-1a90147116b680f9d5b93c82c4b96f28a7bf5645.tar.xz mdadm-1a90147116b680f9d5b93c82c4b96f28a7bf5645.zip |
Some guid manipulation utilities has been added.
It will be used for reading efi variables with capabilities.
Signed-off-by: Przemyslaw Czarnowski <przemyslaw.hawrylewicz.czarnowski@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'platform-intel.h')
-rw-r--r-- | platform-intel.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/platform-intel.h b/platform-intel.h index 549ced5b..0cba6c74 100644 --- a/platform-intel.h +++ b/platform-intel.h @@ -197,6 +197,21 @@ struct sys_dev { struct sys_dev *next; }; +struct efi_guid { + __u8 b[16]; +}; + +static inline char *guid_str(char *buf, struct efi_guid guid) +{ + sprintf(buf, "%02x%02x%02x%02x-%02x%02x-%02x%02x-" + "%02x%02x-%02x%02x%02x%02x%02x%02x", + guid.b[3], guid.b[2], guid.b[1], guid.b[0], + guid.b[5], guid.b[4], guid.b[7], guid.b[6], + guid.b[8], guid.b[9], guid.b[10], guid.b[11], + guid.b[12], guid.b[13], guid.b[14], guid.b[15]); + return buf; +} + char *diskfd_to_devpath(int fd); struct sys_dev *find_driver_devices(const char *bus, const char *driver); struct sys_dev *find_intel_devices(void); |