Skip to content

Commit

Permalink
bginfo fixup
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Maslowski <[email protected]>
  • Loading branch information
orangecms committed Sep 22, 2024
1 parent 3d398e8 commit 044a9ee
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions cmds/bginfo/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@ func main() {
log.Fatalf("cannot read input file: %x", err)
}

ACBPMagic := []byte("__ACBP__")
acbpMagic := []byte("__ACBP__")

Check failure on line 34 in cmds/bginfo/main.go

View workflow job for this annotation

GitHub Actions / lint (1.21, ubuntu-latest)

acbpMagic declared and not used

Check failure on line 34 in cmds/bginfo/main.go

View workflow job for this annotation

GitHub Actions / lint (1.22, ubuntu-latest)

acbpMagic declared and not used
// __IBBS__ also seen in the next 16 bytes; not sure what that is
offset := bytes.Index(data, ACBPMagic)

Check failure on line 36 in cmds/bginfo/main.go

View workflow job for this annotation

GitHub Actions / lint (1.21, ubuntu-latest)

undefined: ACBPMagic

Check failure on line 36 in cmds/bginfo/main.go

View workflow job for this annotation

GitHub Actions / lint (1.22, ubuntu-latest)

undefined: ACBPMagic
if offset == -1 {
log.Fatalf("no %v (%x) magic found", string(ACBPMagic), ACBPMagic)

Check failure on line 38 in cmds/bginfo/main.go

View workflow job for this annotation

GitHub Actions / lint (1.21, ubuntu-latest)

undefined: ACBPMagic (typecheck)

Check failure on line 38 in cmds/bginfo/main.go

View workflow job for this annotation

GitHub Actions / lint (1.22, ubuntu-latest)

undefined: ACBPMagic (typecheck)
}

m := bgbootpolicy.Manifest{}
_, err = m.ReadFrom(bytes.NewReader(data[offset:]))
if err != nil {
if _, err = m.ReadFrom(bytes.NewReader(data[offset:])); err != nil {
log.Fatalf("%v", err)
}

Expand Down

0 comments on commit 044a9ee

Please sign in to comment.