Fix/cleanup chassis bootparam and bootdev options#165
Merged
AlexanderAmelkin merged 6 commits intomasterfrom Nov 12, 2019
Merged
Fix/cleanup chassis bootparam and bootdev options#165AlexanderAmelkin merged 6 commits intomasterfrom
AlexanderAmelkin merged 6 commits intomasterfrom
Conversation
Contributor
Author
|
@jvillal-amp, please check if this works for you. |
jvillal-amp
reviewed
Nov 6, 2019
There was a problem hiding this comment.
@jvillal-amp, please check if this works for you.
This resolved my issue. I tested setting DISK to PERSISTENT boot with EFI and it stayed that way for multiple boots. I also tested setting PXE to PERSISTENT boot with EFI and it stayed that way for multiple boots.
My testing command (without username/password/host):
ipmitool -I lanplus chassis bootdev disk options=efiboot,persistent
ipmitool -I lanplus chassis power cycle
and
ipmitool -I lanplus chassis bootdev pxe options=efiboot,persistent
ipmitool -I lanplus chassis power cycle
Thank you! 😊
jvillal-amp
reviewed
Nov 6, 2019
vmauery
reviewed
Nov 6, 2019
vmauery
approved these changes
Nov 6, 2019
vmauery
previously approved these changes
Nov 6, 2019
artemsen
reviewed
Nov 7, 2019
Refactor the boot flags decoder: * Add macros for boot flag bits, replace magic numbers in the `chassis bootparam get 5` and in `chassis bootdev` handlers. The macros are prefixed with BFx_ where x stands for the boot flags data byte as per IPMI 2.0 specification Table 28-14; * Add decoding of remote/redirected media boot flags; * Remove erroneous decoding of boot flags byte 3 bit 1 as Sleep button lockout whereas the bit is a part of console redirection setting; * Fix console redirection settings reported under the 'BIOS verbosity' header and vice versa; * Fix resetting of all other boot flags in the data byte when setting any of the bits in the same byte. This fixes inability to set both 'efiboot' and 'persistent' bits at the same time, and other similar cases. Resolves #163 Signed-off-by: Alexander Amelkin <[email protected]>
There was a wrong help message regarding the console redirection, and also the help formatting was a bit off. Straightened this all up. Signed-off-by: Alexander Amelkin <[email protected]>
Move bootdev options parsing to a separate helper function Signed-off-by: Alexander Amelkin <[email protected]>
* Get rid of magic '8' in bootdev options processing. * Optimize the code of bootdev arguments processing, remove the special crafting of flags for 'clear-cmos' argument, make it use the same code as other options. Signed-off-by: Alexander Amelkin <[email protected]>
In ipmi_chassis_main: * Default to error return code (-1). * Use centralized exit. Signed-off-by: Alexander Amelkin <[email protected]>
For parameter checking replace calls to strncmp() with calls to strcmp() in order to improve readability and get rid of literal string lengths. Signed-off-by: Alexander Amelkin <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This resolves #163 and also cleans up
chassis bootparam getdecoding andchassis bootdev options=...parsing.Please read individual commit messages.