1 #ifndef _GPXE_BLOCKDEV_H
2 #define _GPXE_BLOCKDEV_H
11 FILE_LICENCE ( GPL2_OR_LATER
);
13 #include <gpxe/uaccess.h>
17 /** Block device operations */
18 struct block_device_operations
{
22 * @v blockdev Block device
23 * @v block Block number
24 * @v count Block count
25 * @v buffer Data buffer
26 * @ret rc Return status code
28 int ( * read
) ( struct block_device
*blockdev
, uint64_t block
,
29 unsigned long count
, userptr_t buffer
);
33 * @v blockdev Block device
34 * @v block Block number
35 * @v count Block count
36 * @v buffer Data buffer
37 * @ret rc Return status code
39 int ( * write
) ( struct block_device
*blockdev
, uint64_t block
,
40 unsigned long count
, userptr_t buffer
);
45 /** Block device operations */
46 struct block_device_operations
*op
;
49 /** Total number of blocks */
53 #endif /* _GPXE_BLOCKDEV_H */