diff options
| author | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2016-07-26 12:02:18 -0400 |
|---|---|---|
| committer | Mathieu Trudel-Lapierre <mathieu.trudel-lapierre@canonical.com> | 2016-07-26 12:02:18 -0400 |
| commit | d3819813b8e0a64400ddf3ce033bae7c3f245508 (patch) | |
| tree | 79ea54361f1b1fa10749101827391726a3f4bcef /lib/guid.c | |
| parent | a14921c5944c340056312f2f5b1728d698f628b1 (diff) | |
| download | efi-boot-shim-d3819813b8e0a64400ddf3ce033bae7c3f245508.tar.gz efi-boot-shim-d3819813b8e0a64400ddf3ce033bae7c3f245508.zip | |
Import upstream version 0.9+1465500757.14a5905
Diffstat (limited to 'lib/guid.c')
| -rw-r--r-- | lib/guid.c | 26 |
1 files changed, 0 insertions, 26 deletions
@@ -5,32 +5,6 @@ */ #include <guid.h> -#include <stdio.h> - -#ifndef BUILD_EFI -/* EFI has %g for this, so it's only needed in platform c */ -const char *guid_to_str(EFI_GUID *guid) -{ - static char str[256]; - - sprintf(str, "%08x-%04hx-%04hx-%02hhx%02hhx-%02hhx%02hhx%02hhx%02hhx%02hhx%02hhx", - guid->Data1, guid->Data2, guid->Data3, - guid->Data4[0], guid->Data4[1], guid->Data4[2], - guid->Data4[3], guid->Data4[4], guid->Data4[5], - guid->Data4[6], guid->Data4[7]); - - return str; -} - -void str_to_guid(const char *str, EFI_GUID *guid) -{ - sscanf(str, "%8x-%4hx-%4hx-%2hhx%2hhx-%2hhx%2hhx%2hhx%2hhx%2hhx%2hhx", - &guid->Data1, &guid->Data2, &guid->Data3, - guid->Data4, guid->Data4 + 1, guid->Data4 + 2, - guid->Data4 + 3, guid->Data4 + 4, guid->Data4 + 5, - guid->Data4 + 6, guid->Data4 + 7); -} -#endif /* all the necessary guids */ EFI_GUID GV_GUID = EFI_GLOBAL_VARIABLE; |
