CardSight 0.1.0
C API reference for the CardSight firmware and application
Loading...
Searching...
No Matches
gendisk Struct Reference

A disk as a driver describes it to the block layer. More...

#include <blkdev.h>

Data Fields

char disk_name [DISK_NAME_LEN]
void * private_data
const struct block_device_operations * fops
uint64_t capacity
uint32_t logical_block_size
uint32_t flags
struct block_device * part0
struct block_device * parts
uint32_t part_count
struct gendisk * next
bool registered
bool dead

Detailed Description

A disk as a driver describes it to the block layer.

Field Documentation

◆ capacity

uint64_t gendisk::capacity

Sectors of logical_block_size bytes.

◆ dead

bool gendisk::dead

del_gendisk() ran: every access fails with -ENODEV.

◆ disk_name

char gendisk::disk_name[DISK_NAME_LEN]

Set by the driver before add_disk().

◆ flags

uint32_t gendisk::flags

GENHD_FL_* flags.

◆ fops

const struct block_device_operations* gendisk::fops

Driver operations.

◆ logical_block_size

uint32_t gendisk::logical_block_size

Bytes per sector; 512.

◆ next

struct gendisk* gendisk::next

The registered disks.

◆ part0

struct block_device* gendisk::part0

The whole disk.

◆ part_count

uint32_t gendisk::part_count

Number of partitions in parts.

◆ parts

struct block_device* gendisk::parts

The partitions, in partition number order.

◆ private_data

void* gendisk::private_data

Driver-private state.

◆ registered

bool gendisk::registered

Whether add_disk() succeeded.


The documentation for this struct was generated from the following file: