iPXE
fs.h
Go to the documentation of this file.
1 #ifndef FS_H
2 #define FS_H
3 
4 #include <stdint.h>
5 
6 //typedef uint64_t sector_t;
7 
8 #ifdef IDE_DISK
9 int ide_probe(int drive);
10 int ide_read(int drive, sector_t sector, void *buffer);
11 #endif
12 
13 #ifdef USB_DISK
14 int usb_probe(int drive);
15 int usb_read(int drive, sector_t sector, void *buffer);
16 #endif
17 
18 #define DISK_IDE 1
19 #define DISK_MEM 2
20 #define DISK_USB 3
21 
22 int devopen(const char *name, int *reopen);
23 int devread(unsigned long sector, unsigned long byte_offset,
24  unsigned long byte_len, void *buf);
25 
26 int file_open(const char *filename);
27 int file_read(void *buf, unsigned long len);
28 int file_seek(unsigned long offset);
29 unsigned long file_size(void);
30 
31 #define PARTITION_UNKNOWN 0xbad6a7
32 
33 #ifdef ELTORITO
34 int open_eltorito_image(int part, unsigned long *start, unsigned long *length);
35 #else
36 # define open_eltorito_image(x,y,z) PARTITION_UNKNOWN
37 #endif
38 
39 extern int using_devsize;
40 
41 #endif /* FS_H */
uint16_t length
Length.
Definition: intel.h:14
const char * name
Definition: ath9k_hw.c:1984
int file_open(const char *filename)
uint32_t buffer
Buffer index (or NETVSC_RNDIS_NO_BUFFER)
Definition: netvsc.h:16
uint8_t drive
Drive number.
Definition: int13.h:16
uint32_t sector
Boot catalog sector.
Definition: eltorito.h:17
uint32_t start
Starting offset.
Definition: netvsc.h:12
int devopen(const char *name, int *reopen)
int file_seek(unsigned long offset)
static userptr_t size_t offset
Offset of the first segment within the content.
Definition: deflate.h:259
int file_read(void *buf, unsigned long len)
uint32_t len
Length.
Definition: ena.h:14
unsigned long file_size(void)
#define open_eltorito_image(x, y, z)
Definition: fs.h:36
int using_devsize
static int usb_probe(struct usb_function *func, struct usb_configuration_descriptor *config)
Probe USB device driver.
Definition: usb.c:1211
int devread(unsigned long sector, unsigned long byte_offset, unsigned long byte_len, void *buf)