Chameleon

Chameleon Svn Source Tree

Root/branches/meklort/i386/libsaio/convert.h

Source at commit 360 created 13 years 11 months ago.
By azimutz, End "search algo" related stuff. Check Mac OS X version on processBootOptions() so we can override Boot.plist from OS specific folders. This check doesn't print to screen so, we still check Mac OS X version on boot.c as before. Initializing gMacOSVersion on options.c instead of boot.c. Also "Draw background, turn off any GUI elements and update VRAM" a bit early (as early as possible) on common_boot, so we can catch verbose from loadOverrideConfig. If i didn't forgot something, this concludes the search algo as is atm :)
1/*
2 * Convert.h
3 * Declare conversion utility functions
4 * --Rek
5 */
6
7#ifndef __CONVERT_H
8#define __CONVERT_H
9#include "libsaio.h"
10#include "efi.h"
11
12#define UUID_LEN16
13
14const char * getStringFromUUID(const EFI_CHAR8* uuid);
15EFI_CHAR8* getUUIDFromString(const char *source);
16void *convertHexStr2Binary(const char *hexStr, int *outLength);
17uint32_t ascii_hex_to_int(char *buff);
18
19static inline uint16_t dp_swap16(uint16_t toswap)
20{
21 return (((toswap & 0x00FF) << 8) | ((toswap & 0xFF00) >> 8));
22}
23
24static inline uint32_t dp_swap32(uint32_t toswap)
25{
26 return ((toswap & 0x000000FF) << 24) |
27 ((toswap & 0x0000FF00) << 8 ) |
28 ((toswap & 0x00FF0000) >> 8 ) |
29 ((toswap & 0xFF000000) >> 24);
30}
31
32
33#endif
34

Archive Download this file

Revision: 360