udev

package
v0.0.0-...-c74f1dd Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RulesPath = "/etc/udev/rules.d/"
	RulesFile = "98-device-flasher.rules"
)

Variables

View Source
var (
	DefaultUDevRules = UDevRules{
		[]UDevRule{
			{
				"Google",
				"18d1",
			},
			{
				"Xiaomi",
				"2717",
			},
		},
	}
)
View Source
var TempRulesFile = os.TempDir() + "/" + RulesFile

Functions

func Setup

func Setup(logger *logrus.Logger, udevRules UDevRules) error

Types

type UDevRule

type UDevRule struct {
	DeviceName   string
	AttrIDVendor string
}

type UDevRules

type UDevRules struct {
	Rules []UDevRule
}

func (*UDevRules) Output

func (u *UDevRules) Output() ([]byte, error)

Jump to

Keyboard shortcuts

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