initrd

package
v0.0.0-...-1ff0e3b Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2017 License: Apache-2.0 Imports: 9 Imported by: 0

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, err error)

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

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