system

package
v0.0.0-...-5331e25 Latest Latest
Warning

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

Go to latest
Published: Aug 28, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2019 Northern.tech AS

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Copyright 2019 Northern.tech AS

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Index

Constants

View Source
const UBI_IOCVOLUP ioctlRequestValue = 0x40084f00

Taken from <mtd/ubi-user.h>

Variables

View Source
var NotABlockDevice = errors.New("Not a block device.")

Functions

func GetBlockDeviceSectorSize

func GetBlockDeviceSectorSize(file *os.File) (int, error)

func GetBlockDeviceSize

func GetBlockDeviceSize(file *os.File) (uint64, error)

func IsUbiBlockDevice

func IsUbiBlockDevice(deviceName string) bool

func SetUbiUpdateVolume

func SetUbiUpdateVolume(file *os.File, imageSize int64) error

Types

type Commander

type Commander interface {
	Command(name string, arg ...string) *exec.Cmd
}

type OsCalls

type OsCalls struct {
}

we need real OS implementation

func (OsCalls) Command

func (OsCalls) Command(name string, arg ...string) *exec.Cmd

func (OsCalls) Stat

func (OsCalls) Stat(name string) (os.FileInfo, error)

type StatCommander

type StatCommander interface {
	Stat(string) (os.FileInfo, error)
	Commander
}

type SystemRebootCmd

type SystemRebootCmd struct {
	// contains filtered or unexported fields
}

func NewSystemRebootCmd

func NewSystemRebootCmd(command Commander) *SystemRebootCmd

func (*SystemRebootCmd) Reboot

func (s *SystemRebootCmd) Reboot() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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