Merging upstream version 6.02~pre7+dfsg.
[syslinux-debian/hramrach.git] / efi / fio.h
blob65fff8df0ee151f4c3438260e04275faf20fe542
1 #ifndef _H_EFI_FIO_
2 #define _H_EFI_FIO_
4 /*
5 * Friendly interfaces for EFI file I/O and various EFI support functions
6 */
8 /* MAX_EFI_ARGS - command line args for EFI executable
9 * WS(c16) - check for CHAR16 white space
11 #define MAX_EFI_ARGS 64
12 #define WS(c16) (c16 == L' ' || c16 == CHAR_TAB)
14 /* VPrint is not in export declarations in gnu-efi lib yet
15 * although it is a global function; declare it here
17 extern UINTN
18 VPrint (
19 IN CHAR16 *fmt,
20 va_list args
23 extern EFI_STATUS efi_errno;
25 void efi_memcpy(unsigned char *dst, unsigned char *src, size_t len);
26 void efi_memmove(unsigned char *dst, unsigned char *src, size_t len);
27 void efi_memset(unsigned char *dst, unsigned char val, size_t len);
28 void *efi_alloc(int size);
29 void efi_free(void *ptr);
30 void efi_perror(CHAR16 *str);
31 void efi_printerr(IN CHAR16 *fmt, ...);
32 void efi_printout(IN CHAR16 *fmt, ...);
33 EFI_STATUS efi_set_volroot(EFI_HANDLE device_handle);
34 EFI_FILE_HANDLE efi_open(CHAR16 *file, UINT64 mode);
35 void efi_close(EFI_FILE_HANDLE fd);
36 void efi_sync(EFI_FILE_HANDLE fd);
37 size_t efi_xpread(EFI_FILE_HANDLE fd, void *buf, size_t count, off_t offset);
38 size_t efi_xpwrite(EFI_FILE_HANDLE fd, void *buf, size_t count, off_t offset);
39 int efi_fstat(EFI_FILE_HANDLE fd, EFI_FILE_INFO *st);
40 void efi_set_attributes(EFI_FILE_HANDLE fd);
41 void efi_clear_attributes(EFI_FILE_HANDLE fd);
43 #endif