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

One openable view of a disk: the whole disk or one partition. More...

#include <blkdev.h>

Data Fields

struct device dev
 Backing device; the name is the disk name or "<disk>p<N>".
struct gendisk * bd_disk
uint32_t partno
uint64_t start_sect
uint64_t nr_sects
uint8_t part_type
bool read_only
char label [BDEV_LABEL_LEN]
uint32_t openers
uint32_t mounts
struct block_device * next

Detailed Description

One openable view of a disk: the whole disk or one partition.

Field Documentation

◆ bd_disk

struct gendisk* block_device::bd_disk

Disk this view belongs to.

◆ label

char block_device::label[BDEV_LABEL_LEN]

Partition label, empty when none.

◆ mounts

uint32_t block_device::mounts

File systems mounted from it.

◆ next

struct block_device* block_device::next

Next partition of the disk.

◆ nr_sects

uint64_t block_device::nr_sects

Length of the view in sectors.

◆ openers

uint32_t block_device::openers

bdev_open_by_name() calls without bdev_close() yet.

◆ part_type

uint8_t block_device::part_type

Partition table type byte; 0 for a disk or without a table.

◆ partno

uint32_t block_device::partno

Partition number; 0 is the whole disk.

◆ read_only

bool block_device::read_only

Whether this view refuses writes.

◆ start_sect

uint64_t block_device::start_sect

First sector in the disk.


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