Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove the dependency on un-idiomatic Go strings for IPMI blobs. #2640

Merged
merged 1 commit into from
Mar 23, 2023

Conversation

chrisfenner
Copy link
Member

In #2622, the u-root IPMI blob library was fixed to stop requiring blob IDs to contain trailing NUL characters in them (which is unidiomatic). As a backwards-compatibility step, the library still accepts blob IDs with the trailing NUL, but the library did stop providing blob ID strings (in BlobEnumerate) with these trailing NULs.

The smbios transfer utility had a hard dependency on this trailing NUL (in the equality check). This change fixes that in a way that still supports old versions of u-root if needed, by using strings.TrimSuffix.

@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.16 🎉

Comparison is base (8b9c6f5) 74.93% compared to head (440a23a) 75.09%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2640      +/-   ##
==========================================
+ Coverage   74.93%   75.09%   +0.16%     
==========================================
  Files         413      413              
  Lines       41661    41661              
==========================================
+ Hits        31217    31285      +68     
+ Misses      10444    10376      -68     

see 5 files with indirect coverage changes

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

brandonkimbk
brandonkimbk previously approved these changes Mar 22, 2023
In u-root#2622, the u-root IPMI blob library was fixed to stop requiring blob IDs to contain trailing NUL characters in them (which is unidiomatic). As a backwards-compatibility step, the library still accepts blob IDs with the trailing NUL, but the library did stop providing blob ID strings (in BlobEnumerate) with these trailing NULs.

The smbios transfer utility had a hard dependency on this trailing NUL (in the equality check). This change fixes that in a way that still supports old versions of u-root if needed, by using strings.TrimSuffix.

Signed-off-by: Chris Fenner <cfenn@google.com>
@chrisfenner chrisfenner merged commit 809e479 into u-root:main Mar 23, 2023
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.

4 participants