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

fat: Fix incomplete comparing in compare_name and compare_short_name #165

Merged
merged 2 commits into from
Jan 18, 2022

Conversation

yuuzi41
Copy link
Contributor

@yuuzi41 yuuzi41 commented Jan 14, 2022

compare_name function and compare_short_name function compare incompletely if the argument "name" is shorter than a name of directory entries.
This causes a failure to load EFI as reported in #164

Signed-off-by: Yuji Hagiwara [email protected]

@rbradford
Copy link
Member

Thanks for your contribution.

Please commit using -s to give the correct sign-off. And use Fixes:#164 in the commit message.

Yuji Hagiwara and others added 2 commits January 15, 2022 02:59
compare_name and compare_short_name compare incompletely if the argument "name" is shorter than a name of directory entries.
This causes a failure to load EFI as reported in cloud-hypervisor#164

Fixes:cloud-hypervisor#164

Signed-off-by: Yuji Hagiwara <[email protected]>
default_entry_file() returns only the basename but it doesn't return the extension.
this becomes problematic after compare_name() compare names' length too to fix cloud-hypervisor#164.
default_entry_file() seems to assume that the extension of the file is ".conf".

Signed-off-by: Yuji Hagiwara <[email protected]>
@yuuzi41
Copy link
Contributor Author

yuuzi41 commented Jan 16, 2022

Thank you for your suggestion.
I corrected the signed-off and the commit message as you suggested.
And also I added one more commit to fix the CI failure due to an effect of this PR.

@rbradford rbradford requested a review from retrage January 17, 2022 15:07
Copy link
Contributor

@retrage retrage left a comment

Choose a reason for hiding this comment

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

Thank you for the PR. It looks good. This change adds a more accurate FAT directory name comparison.

@retrage retrage merged commit e070e7f into cloud-hypervisor:main Jan 18, 2022
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