2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-15 15:51:44 +00:00
xNBA/src/include/gpxe/blockdev.h

44 lines
837 B
C
Raw Normal View History

2006-05-13 11:36:30 +00:00
#ifndef _GPXE_BLOCKDEV_H
#define _GPXE_BLOCKDEV_H
/**
* @file
*
* Block devices
*
*/
#include <gpxe/uaccess.h>
2006-05-13 11:36:30 +00:00
/** A block device */
struct block_device {
/** Block size */
size_t blksize;
/** Total number of blocks */
uint64_t blocks;
/**
* Read block
*
* @v blockdev Block device
* @v block Block number
* @v count Block count
2006-05-13 11:36:30 +00:00
* @v buffer Data buffer
* @ret rc Return status code
*/
int ( * read ) ( struct block_device *blockdev, uint64_t block,
unsigned long count, userptr_t buffer );
2006-05-13 11:36:30 +00:00
/**
* Write block
*
* @v blockdev Block device
* @v block Block number
* @v count Block count
2006-05-13 11:36:30 +00:00
* @v buffer Data buffer
* @ret rc Return status code
*/
int ( * write ) ( struct block_device *blockdev, uint64_t block,
unsigned long count, userptr_t buffer );
2006-05-13 11:36:30 +00:00
};
#endif /* _GPXE_BLOCKDEV_H */