Skip to content

Utk support for subcommands#5

Merged
GanShun merged 2 commits intolinuxboot:masterfrom
GanShun:utk-review
Jun 8, 2018
Merged

Utk support for subcommands#5
GanShun merged 2 commits intolinuxboot:masterfrom
GanShun:utk-review

Conversation

@GanShun
Copy link
Copy Markdown
Member

@GanShun GanShun commented Jun 7, 2018

This allows us to do stuff like utk parse or utk extract in the future.

Signed-off-by: Gan Shun Lim <ganshun@gmail.com>
@codecov-io
Copy link
Copy Markdown

codecov-io commented Jun 7, 2018

Codecov Report

Merging #5 into master will not change coverage.
The diff coverage is 0%.

Impacted file tree graph

@@         Coverage Diff          @@
##           master    #5   +/-   ##
====================================
  Coverage       0%    0%           
====================================
  Files          11    11           
  Lines         448   467   +19     
====================================
- Misses        448   467   +19
Impacted Files Coverage Δ
uefi/flashregionsection.go 0% <0%> (ø) ⬆️
utk/utk.go 0% <0%> (ø) ⬆️
uefi/firmwarevolume.go 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ff3590c...5c01511. Read the comment docs.

rminnich
rminnich previously approved these changes Jun 8, 2018
Comment thread utk/utk.go Outdated
func (*parseCmd) SetFlags(_ *flag.FlagSet) {}

func (*parseCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}) subcommands.ExitStatus {
if len(f.Args()) == 0 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all fine, one thought: I once had it suggested to me that if you use f.Args() more than once, you should just do args := f.Args() since the call cost is nontrivial. I don't necessarily agree with this, but thought I'd mention it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

chris, in case you doing me on this, it was a comment from Adin :-)

The idea is that in the future, you'll do something like utk parse
or utk extract <rom>

Signed-off-by: Gan Shun Lim <ganshun@gmail.com>
Copy link
Copy Markdown
Contributor

@rminnich rminnich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok that's weird I thought I just approved this one.

@GanShun
Copy link
Copy Markdown
Member Author

GanShun commented Jun 8, 2018

That's cause I just made the change you suggested and pushed again

@GanShun GanShun merged commit 6521f33 into linuxboot:master Jun 8, 2018
@GanShun GanShun deleted the utk-review branch June 8, 2018 16:32
xaionaro added a commit that referenced this pull request May 9, 2023
Go checks the pointers used, and it is required to follow the
rule #5 of "unsafe.Pointer" which requires to convert back
to "unsafe.Pointer" no later than in the same line where it was
converted to uintptr.
xaionaro added a commit that referenced this pull request May 9, 2023
Go checks the pointers used, and it is required to follow the
rule #5 of "unsafe.Pointer" which requires to convert back
to "unsafe.Pointer" no later than in the same line where it was
converted to uintptr.
xaionaro added a commit that referenced this pull request May 9, 2023
Go checks the pointers used, and it is required to follow the
rule #5 of "unsafe.Pointer" which requires to convert back
to "unsafe.Pointer" no later than in the same line where it was
converted to uintptr.
xaionaro added a commit that referenced this pull request May 9, 2023
Go checks the pointers used, and it is required to follow the
rule #5 of "unsafe.Pointer" which requires to convert back
to "unsafe.Pointer" no later than in the same line where it was
converted to uintptr.
xaionaro added a commit that referenced this pull request May 9, 2023
Go checks the pointers used, and it is required to follow the
rule #5 of "unsafe.Pointer" which requires to convert back
to "unsafe.Pointer" no later than in the same line where it was
converted to uintptr.
xaionaro added a commit that referenced this pull request May 9, 2023
Go checks the pointers used, and it is required to follow the
rule #5 of "unsafe.Pointer" which requires to convert back
to "unsafe.Pointer" no later than in the same line where it was
converted to uintptr.

Signed-off-by: Dmitrii Okunev <xaionaro@meta.com>
xaionaro added a commit that referenced this pull request May 9, 2023
Go checks the pointers used, and it is required to follow the
rule #5 of "unsafe.Pointer" which requires to convert back
to "unsafe.Pointer" no later than in the same line where it was
converted to uintptr.

Signed-off-by: Dmitrii Okunev <xaionaro@meta.com>
xaionaro added a commit that referenced this pull request May 11, 2023
Go checks the pointers used, and it is required to follow the
rule #5 of "unsafe.Pointer" which requires to convert back
to "unsafe.Pointer" no later than in the same line where it was
converted to uintptr.

Signed-off-by: Dmitrii Okunev <xaionaro@meta.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants