udev

package
v0.0.0-...-677ed08 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2016 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package udev implements integration between snappy, udev and ubuntu-core-laucher around tagging character and block devices so that they can be accessed by applications.

TODO: Document this better

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReloadRules

func ReloadRules() error

ReloadRules runs two commands that reload udev rule database.

The commands are: udevadm control --reload-rules

udevadm trigger

Types

type Backend

type Backend struct{}

Backend is responsible for maintaining udev rules.

func (*Backend) Name

func (b *Backend) Name() string

Name returns the name of the backend.

func (*Backend) Remove

func (b *Backend) Remove(snapName string) error

Remove removes udev rules specific to a given snap. If any of the rules are removed then udev database is reloaded.

This method should be called after removing a snap.

If the method fails it should be re-tried (with a sensible strategy) by the caller.

func (*Backend) Setup

func (b *Backend) Setup(snapInfo *snap.Info, devMode bool, repo *interfaces.Repository) error

Setup creates udev rules specific to a given snap. If any of the rules are changed or removed then udev database is reloaded.

Since udev has no concept of a complain mode, devMode is ignored.

If the method fails it should be re-tried (with a sensible strategy) by the caller.

Jump to

Keyboard shortcuts

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