blob: 77256aaba97d3943242e666f9e09567ef48c36eb [file] [log] [blame]
#ifndef BLOCKDEV_H
#define BLOCKDEV_H
/** devopen
* @param name Filename to be used as blockdevice
* @param reopen Unused, set NULL
* @return 1 on success, 0 on failure !CAUTION
*/
int devopen(const char *name, int *reopen);
/** devclose
*/
void devclose(void);
/** devread
* @param sector 512 byte sector of the block device
* @param byte_offset Offset in the block
* @param byte_len Buffer length
* @param buf Buffer
* @return 1 on sucess, 0 on failure !CAUTION
*/
int devread(unsigned long sector, unsigned long byte_offset,
unsigned long byte_len, void *buf);
//void dev_set_partition(unsigned long start, unsigned long size);
//void dev_get_partition(unsigned long *start, unsigned long *size);
//int file_open(const char *filename);
//int file_read(void *buf, unsigned long len);
//unsigned long file_seek(unsigned long offset);
//unsigned long file_size(void);
//void file_set_size(unsigned long size);
//void file_close(void);
#endif /* BLOCKDEV_H */