[blockdev] Move block device operations to structure block_device_operations

Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
This commit is contained in:
Laurent Vivier
2008-11-19 17:31:07 +01:00
committed by Michael Brown
parent b48f37e69a
commit a2686a55c4
5 changed files with 44 additions and 20 deletions

View File

@@ -10,12 +10,10 @@
#include <gpxe/uaccess.h>
/** A block device */
struct block_device {
/** Block size */
size_t blksize;
/** Total number of blocks */
uint64_t blocks;
struct block_device;
/** Block device operations */
struct block_device_operations {
/**
* Read block
*
@@ -40,4 +38,14 @@ struct block_device {
unsigned long count, userptr_t buffer );
};
/** A block device */
struct block_device {
/** Block device operations */
struct block_device_operations *op;
/** Block size */
size_t blksize;
/** Total number of blocks */
uint64_t blocks;
};
#endif /* _GPXE_BLOCKDEV_H */