|
CardSight 0.1.0
C API reference for the CardSight firmware and application
|
Operations a disk driver provides to the block layer. More...
#include <blkdev.h>
Data Fields | |
| int(* | read )(struct gendisk *disk, uint64_t sector, void *buffer, uint32_t count) |
| Read sectors. | |
| int(* | write )(struct gendisk *disk, uint64_t sector, const void *buffer, uint32_t count) |
| Write sectors; may be NULL on a disk with GENHD_FL_RDONLY. | |
| int(* | flush )(struct gendisk *disk) |
| Write out what the disk holds back; NULL when it writes through. | |
| void(* | free_disk )(struct gendisk *disk) |
| Release driver state when the last reference is gone. | |
Operations a disk driver provides to the block layer.
| void(* block_device_operations::free_disk) (struct gendisk *disk) |
Release driver state when the last reference is gone.
The disk was deleted and nobody has it open; free private_data here.
| int(* block_device_operations::read) (struct gendisk *disk, uint64_t sector, void *buffer, uint32_t count) |
Read sectors.
Sector numbers are relative to the disk, the range was checked, and the buffer is 64-byte aligned.