summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorLaurent Vivier2008-11-19 17:31:07 +0100
committerMichael Brown2008-11-19 21:04:43 +0100
commita2686a55c4799f34dcaa60e14097ed0e8f5c9254 (patch)
treecc9d38a621fd9ebeb6ef9f63bfcc083fec1824b5 /src/include
parent[virtio] Split virtio-net.c into several files. (diff)
downloadipxe-a2686a55c4799f34dcaa60e14097ed0e8f5c9254.tar.gz
ipxe-a2686a55c4799f34dcaa60e14097ed0e8f5c9254.tar.xz
ipxe-a2686a55c4799f34dcaa60e14097ed0e8f5c9254.zip
[blockdev] Move block device operations to structure block_device_operations
Signed-off-by: Laurent Vivier <Laurent.Vivier@bull.net>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gpxe/blockdev.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/include/gpxe/blockdev.h b/src/include/gpxe/blockdev.h
index 467ed1d9..8222984a 100644
--- a/src/include/gpxe/blockdev.h
+++ b/src/include/gpxe/blockdev.h
@@ -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 */