iPXE
fs.h
Go to the documentation of this file.
00001 #ifndef FS_H
00002 #define FS_H
00003 
00004 #include <stdint.h>
00005 
00006 //typedef uint64_t sector_t;
00007 
00008 #ifdef IDE_DISK
00009 int ide_probe(int drive);
00010 int ide_read(int drive, sector_t sector, void *buffer);
00011 #endif
00012 
00013 #ifdef USB_DISK
00014 int usb_probe(int drive);
00015 int usb_read(int drive, sector_t sector, void *buffer);
00016 #endif
00017 
00018 #define DISK_IDE 1
00019 #define DISK_MEM 2
00020 #define DISK_USB 3
00021 
00022 int devopen(const char *name, int *reopen);
00023 int devread(unsigned long sector, unsigned long byte_offset,
00024         unsigned long byte_len, void *buf);
00025 
00026 int file_open(const char *filename);
00027 int file_read(void *buf, unsigned long len);
00028 int file_seek(unsigned long offset);
00029 unsigned long file_size(void);
00030 
00031 #define PARTITION_UNKNOWN 0xbad6a7
00032 
00033 #ifdef ELTORITO
00034 int open_eltorito_image(int part, unsigned long *start, unsigned long *length);
00035 #else
00036 # define open_eltorito_image(x,y,z) PARTITION_UNKNOWN
00037 #endif
00038 
00039 extern int using_devsize;
00040 
00041 #endif /* FS_H */