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

display proper message with proper errno for kvm. #3750

Merged
merged 7 commits into from
Feb 7, 2025

Conversation

hdwhdw
Copy link
Contributor

@hdwhdw hdwhdw commented Feb 5, 2025

What I did

In KVM, there is no system EEPROM. decode-syseeprom should display the information and return the correct errno (ENODEV).

Currently, on KVM, decode-syseeprom will return OK (0) even if there is no system EEPROM.

How I did it

Check if the platform is kvm, if so, log and return.

How to verify it

root@vlab-01:~# decode-syseeprom
Platform x86_64-kvm_x86_64-r0 does not support EEPROM
root@vlab-01:~# echo $?
19
root@vlab-01:~# python3 -c 'import os, sys; print(os.strerror(int(sys.argv[1])))' 19
No such device

Previous command output (if the output of a command-line utility has changed)

admin@vlab-01:~$ sudo decode-syseeprom -s
Failed to read system EEPROM info
admin@vlab-01:~$ echo $?
0

New command output (if the output of a command-line utility has changed)

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@hdwhdw hdwhdw merged commit a7deb8c into sonic-net:master Feb 7, 2025
7 checks passed
@hdwhdw hdwhdw deleted the kvm branch February 7, 2025 16:38
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