initrd

package
v0.0.0-...-6d37353 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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

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