Skip to content

Conversation

BbolroC
Copy link
Member

@BbolroC BbolroC commented Dec 13, 2024

The current script logic assigns an empty string to APID and APQI when APQN consists entirely of zeros (e.g., "00.0000"). However, this behavior is incorrect, as "00" and "0000" are valid values and should be represented as "0".
This PR ensures that the script assigns the default string “0” to APID and APQI if their computed values are empty.

Signed-off-by: Hyounggyu Choi Hyounggyu.Choi@ibm.com

The current script logic assigns an empty string to APID and APQI
when APQN consists entirely of zeros (e.g., "00.0000").
However, this behavior is incorrect, as "00" and "0000" are valid
values and should be represented as "0".
This commit ensures that the script assigns the default string “0”
to APID and APQI if their computed values are empty.

Signed-off-by: Hyounggyu Choi <Hyounggyu.Choi@ibm.com>
@katacontainersbot katacontainersbot added the size/tiny Smallest and simplest task label Dec 13, 2024
Copy link
Member

@stevenhorsman stevenhorsman left a comment

Choose a reason for hiding this comment

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

Looks reasonable to me. Thanks!

Copy link
Member

@fidencio fidencio left a comment

Choose a reason for hiding this comment

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

lgtm thanks @BbolroC!

@BbolroC BbolroC merged commit cfbc425 into kata-containers:main Dec 13, 2024
254 of 304 checks passed
@BbolroC BbolroC deleted the fix-leading-zero-issue-for-vfio-ap branch December 13, 2024 16:40
danmihai1 pushed a commit to microsoft/kata-containers that referenced this pull request Dec 17, 2024
…o-issue-for-vfio-ap

vfio-ap: Assign default string "0" for empty APID and APQI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ok-to-test size/tiny Smallest and simplest task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants