disks

package
v0.0.0-...-c8996df Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 3, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDiskNameByPartName

func GetDiskNameByPartName(name string) (string, error)

GetDiskNameByPartName returns disk name /dev/sda for part name /dev/sda1 if exists inside we resolve symlink for dev for example /dev/sda9 -> /sys/class/block/mmcblk1p9 -> ../../devices/platform/emmc2bus/fe340000.mmc/mmc_host/mmc1/mmc1:0001/block/mmcblk1/mmcblk1p9 and check if the last part of the path is device, i.e. exists in /sys/block, if not, we use the part of the path before the last part

func GetRootDevice

func GetRootDevice() (string, error)

GetRootDevice returns device EVE booted from, i.e. /dev/sda

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL