disk: add more docs for fields

Complete the docs for fields of `PartitionTable` and `Partition`.
This commit is contained in:
Christian Kellner 2022-02-21 12:27:15 +01:00 committed by Tom Gundersen
parent d9ef268809
commit 4086bf8dbc

View file

@ -15,19 +15,17 @@ import (
)
type PartitionTable struct {
// Size of the disk.
Size uint64
UUID string
// Partition table type, e.g. dos, gpt.
Type string
Size uint64 // Size of the disk (in bytes).
UUID string // Unique identifier of the partition table (GPT only).
Type string // Partition table type, e.g. dos, gpt.
Partitions []Partition
}
type Partition struct {
Start uint64
Size uint64
Type string
Bootable bool
Start uint64 // Start of the partition in sectors
Size uint64 // Size of the partition in sectors
Type string // Partition type, e.g. 0x83 for MBR or a UUID for gpt
Bootable bool // `Legacy BIOS bootable` (GPT) or `active` (DOS) flag
// ID of the partition, dos doesn't use traditional UUIDs, therefore this
// is just a string.
UUID string