Skip to content

Commit 6ca66b2

Browse files
committed
Fix typos in doc.go
Signed-off-by: Ronald G Minnich <[email protected]>
1 parent 3ea81eb commit 6ca66b2

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

vm/doc.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
//
44
// For purposes of convenience, this package provides, via embed, a set of
55
// kernels and initramfs, for several architectures. Currently, it provides
6-
// Linux kernels and initramfs for am64, arm, arm64, and riscv64.
6+
// Linux kernels and initramfs for amd64, arm, arm64, and riscv64.
77
//
88
// The kernels are minimal, hence small; but enable enough options to run
99
// cpud and u-root programs. The initramfs only contain the cpud and

vm/vm.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,16 @@ var images = map[string]Image{
6464
// It will return an error if there is a problem uncompressing
6565
// the kernel and initramfs.
6666
func New(kernel, arch string) (*Image, error) {
67-
common := []string{ /*"-serial", "/dev/tty",*/ "-nographic",
67+
common := []string{
68+
"-nographic",
6869
"-netdev", "user,id=net0,ipv4=on,hostfwd=tcp::17010-:17010",
6970
// required for mac. No idea why. Should work on linux. If not, we'll need a bit
7071
// more logic.
7172
"-device", "e1000-82545em,netdev=net0,id=net0,mac=52:54:00:c9:18:27",
7273
// No password needed, you're just a guest vm ...
7374
// The kernel may not understand ip=dhcp, in which case it just ends up
7475
// in init's environment.
75-
//"--append", "ip=dhcp init=/init -pk \"\" -d",
76+
// To add cpud debugging, you can add -d to the append string.
7677
"--append", "ip=dhcp init=/init -pk \"\"",
7778
}
7879
env := []string{}
@@ -154,9 +155,10 @@ func (image *Image) CommandContext(ctx context.Context, d string, extra ...strin
154155
return c, nil
155156
}
156157

157-
// StartVm is used to starta VM (or in fact any exec.Cmd).
158-
// It includes a one second delay, experimentally needed to wait for the
159-
// guest network to be ready.
158+
// StartVM is used to start a VM (or in fact any exec.Cmd).
159+
// Once cmd.Start is called, StartVM delays for one second.
160+
// This time has been experimentally determined as the minimum
161+
// required for the guest network to be ready.
160162
func (*Image) StartVM(c *exec.Cmd) error {
161163
if err := c.Start(); err != nil {
162164
return fmt.Errorf("starting VM: %w", err)
@@ -165,7 +167,7 @@ func (*Image) StartVM(c *exec.Cmd) error {
165167
return nil
166168
}
167169

168-
// CPUCommand runs a command in a guest runnign cpud.
170+
// CPUCommand runs a command in a guest running cpud.
169171
// It is similar to exec.Command, in that it accepts an arg and
170172
// a set of optional args. It differs in that it can return an error.
171173
// If there are no errors, it returns a client.Cmd.

0 commit comments

Comments
 (0)