initrd

package
v0.0.0-...-98b79ea Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2018 License: Apache-2.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(w *Writer, r io.Reader) (int64, error)

Copy reads a tarball in a stream and outputs a compressed init ram disk

func CopySplitTar

func CopySplitTar(w *Writer, r *tar.Reader) (kernel []byte, cmdline string, ucode []byte, err error)

CopySplitTar copies a tar stream into an initrd, but splits out kernel, cmdline, and ucode

func CopyTar

func CopyTar(w *Writer, r *tar.Reader) (written int64, err error)

CopyTar copies a tar stream into an initrd

Types

type Writer

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

Writer is an io.WriteCloser that writes to an initrd This is a compressed cpio archive, zero padded to 4 bytes

func NewWriter

func NewWriter(w io.Writer) *Writer

NewWriter creates a writer that will output an initrd stream

func (*Writer) Close

func (w *Writer) Close() error

Close closes the writer

func (*Writer) Write

func (w *Writer) Write(b []byte) (n int, e error)

Write writes a cpio file into an initrd

func (*Writer) WriteHeader

func (w *Writer) WriteHeader(hdr *cpio.Header) error

WriteHeader writes a cpio header into an initrd

Jump to

Keyboard shortcuts

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