Skip to content

Commit 75c75c3

Browse files
authored
Small fixes (#5)
1 parent 8ceeda4 commit 75c75c3

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ require (
1414
golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4
1515
)
1616

17-
require (
17+
require (
1818
github.com/benbjohnson/clock v1.1.0 // indirect
1919
github.com/beorn7/perks v1.0.1 // indirect
2020
github.com/cespare/xxhash/v2 v2.1.2 // indirect

pixiecore/booters.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,9 @@ type apibooter struct {
5454

5555
func (b *apibooter) getAPIResponse(m Machine) (io.ReadCloser, error) {
5656
var reqURL string
57+
reqURL = fmt.Sprintf("%s/boot/%s", b.urlPrefix, m.MAC)
5758
if m.GUID != "" {
5859
reqURL = fmt.Sprintf("%s/dhcp/%s", b.urlPrefix, m.GUID)
59-
} else {
60-
reqURL = fmt.Sprintf("%s/boot/%s", b.urlPrefix, m.MAC)
6160
}
6261
resp, err := b.client.Get(reqURL)
6362
if err != nil {

pixiecore/tftp.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,9 +86,9 @@ func (s *Server) readHandler(path string, rf io.ReaderFrom) error {
8686

8787
n, err := rf.ReadFrom(bytes.NewReader(bs))
8888
if err != nil {
89-
s.Log.Errorf("TFTP", "unable to send payload %s", err)
89+
s.Log.Errorf("unable to send payload %s", err)
9090
return err
9191
}
92-
s.Log.Infof("TFTP", "sent %d", n)
92+
s.Log.Infof("sent %d bytes", n)
9393
return nil
9494
}

0 commit comments

Comments
 (0)