Skip to content

GenDiskInit

Defined in: src/fs/block_dev.ts:343

  • Partial<Pick<GenDisk, "first_minor" | "minors" | "capacity" | "removable" | "read_only" | "hidden" | "no_part" | "owner" | "parent" | "attrs">>

optional attrs?: Record<string, DeviceAttribute> = {}

Defined in: src/fs/block_dev.ts:386

Attributes the driver adds to the disk in sysfs, on top of the ones every disk gets

GenDisk.attrs


optional capacity?: number

Defined in: src/fs/block_dev.ts:417

Partial.capacity


readonly optional first_minor?: number = 0

Defined in: src/fs/block_dev.ts:366

The disk’s own minor, which its partitions count up from

GenDisk.first_minor


optional hidden?: boolean

Defined in: src/fs/block_dev.ts:375

Hidden disks exist but are not meant to be used directly, so udev ignores them

GenDisk.hidden


major: number

Defined in: src/fs/block_dev.ts:346


readonly optional minors?: number = 0

Defined in: src/fs/block_dev.ts:369

How many minors are reserved for the disk and its partitions. 0 means partitions are numbered elsewhere.

GenDisk.minors


name: string

Defined in: src/fs/block_dev.ts:348

The disk’s name, which is also the name of its node under /dev


optional no_part?: boolean

Defined in: src/fs/block_dev.ts:378

Whether the disk can be partitioned at all

GenDisk.no_part


ops: BlockDeviceOperations

Defined in: src/fs/block_dev.ts:349


optional owner?: Module

Defined in: src/fs/block_dev.ts:380

GenDisk.owner


optional parent?: Device<unknown>

Defined in: src/fs/block_dev.ts:383

The device this disk hangs off, e.g. its controller. Disks without one are virtual.

GenDisk.parent


optional read_only?: boolean

Defined in: src/fs/block_dev.ts:372

GenDisk.read_only


optional removable?: boolean

Defined in: src/fs/block_dev.ts:371

GenDisk.removable