Skip to content

Commit

Permalink
cmds/intelana: simplify
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Maslowski <[email protected]>
  • Loading branch information
orangecms committed Sep 28, 2024
1 parent cbe3614 commit 4b8e847
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions cmds/intelana/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,16 @@ func main() {
if fi.IFD.Region.FlashRegions[r].Valid() {
offset := fi.IFD.Region.FlashRegions[r].BaseOffset()
size := fi.IFD.Region.FlashRegions[r].EndOffset() - offset
fmt.Printf("%-5s offset %x size %x\n", r, offset, size)
fmt.Printf("%-9s offset %x size %x\n", r, offset, size)
} else {
fmt.Printf("%-5s region not found: %s\n", r, err)
fmt.Printf("%-9s region not found/invalid\n", r)
}
}
}

/*
for _, r := range fi.IFD.Region.FlashRegions {
fmt.Printf(" %#v\n", r)
}
*/

doJson := false

fmt.Printf("\n== FIT ==\n")
table, err := fit.GetTable(data)

Check failure on line 49 in cmds/intelana/main.go

View workflow job for this annotation

GitHub Actions / lint (1.22, ubuntu-latest)

SA4006: this value of `err` is never used (staticcheck)
doJson := false
if doJson {
j, err := json.MarshalIndent(table, "", " ")
if err != nil {
Expand Down

0 comments on commit 4b8e847

Please sign in to comment.