Skip to content

[code sync] Merge code from sonic-net/sonic-utilities:202412 to 202503#193

Merged
mssonicbld merged 2 commits into
Azure:202503from
mssonicbld:sonicbld/202503-merge
Jun 24, 2025
Merged

[code sync] Merge code from sonic-net/sonic-utilities:202412 to 202503#193
mssonicbld merged 2 commits into
Azure:202503from
mssonicbld:sonicbld/202503-merge

Conversation

@mssonicbld

Copy link
Copy Markdown
Collaborator
* 63b68057 - (base/202412) display proper message with proper errno for kvm. (#192) (2025-06-24) [mssonicbld]<br>```

mssonicbld and others added 2 commits June 24, 2025 01:12
<!--
 Please make sure you've read and understood our contributing guidelines:
 https://github.com/Azure/SONiC/blob/gh-pages/CONTRIBUTING.md

 failure_prs.log Make sure all your commits include a signature generated with `git commit -s` **

 If this is a bug fix, make sure your description includes "closes #xxxx",
 "fixes #xxxx" or "resolves #xxxx" so that GitHub automatically closes the related
 issue when the PR is merged.

 If you are adding/modifying/removing any command or utility script, please also
 make sure to add/modify/remove any unit tests from the tests
 directory as appropriate.

 If you are modifying or removing an existing 'show', 'config' or 'sonic-clear'
 subcommand, or you are adding a new subcommand, please make sure you also
 update the Command Line Reference Guide (doc/Command-Reference.md) to reflect
 your changes.

 Please provide the following information:
-->

#### 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 mssonicbld merged commit c9d6fc9 into Azure:202503 Jun 24, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant