NetworkPkg/IScsiDxe: Fix AttemptName cleared on loading defaults#12439
Open
AbuthahirM11 wants to merge 1 commit intotianocore:masterfrom
Open
NetworkPkg/IScsiDxe: Fix AttemptName cleared on loading defaults#12439AbuthahirM11 wants to merge 1 commit intotianocore:masterfrom
AbuthahirM11 wants to merge 1 commit intotianocore:masterfrom
Conversation
Root Cause: The AttemptName string field in IScsiConfigVfr.vfr had default = STRING_TOKEN(STR_NULL), which resolves to an empty string. When optimized defaults are loaded (F3), the form browser resets every field to its defined default, wiping out the actual attempt names (e.g. Attempt 1, Attempt 2) and leaving the field blank. Fix: Add the INTERACTIVE flag to the AttemptName string field in VFR. This tells the form browser to invoke the driver callback when loading defaults instead of applying the hardcoded empty string. In IScsiFormCallback, handle EFI_BROWSER_ACTION_DEFAULT_STANDARD for KEY_ATTEMPT_NAME by reading the actual stored attempt name from mCallbackInfo->Current->AttemptName and returning it as the default value. This ensures loading defaults always restores the correct attempt name for whichever attempt is currently open. Cc: Saloni Kasbekar <saloni.kasbekar@intel.com> Cc: Zachary Clark-williams <zachary.clark-williams@intel.com> Signed-off-by: Abuthahir M <abuthahirm@ami.com>
069e21d to
5a26ce0
Compare
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The AttemptName field in the iSCSI configuration form gets wiped out
when optimized defaults are loaded (F3), replacing names like
"Attempt 1", "Attempt 2" with blank strings.
Root Cause:
The AttemptName string field in IScsiConfigVfr.vfr had
default = STRING_TOKEN(STR_NULL), which resolves to an empty string.
When optimized defaults are loaded, the form browser resets every
field to its defined default, clearing all attempt names.
Fix:
Add the INTERACTIVE flag to the AttemptName string field in VFR so
the form browser invokes the driver callback when loading defaults.
In IScsiFormCallback, handle EFI_BROWSER_ACTION_DEFAULT_STANDARD for
KEY_ATTEMPT_NAME by reading the stored attempt name from
mCallbackInfo->Current->AttemptName and returning it as the default
value. This ensures loading defaults always restores the correct
attempt name.
Cc: Saloni Kasbekar saloni.kasbekar@intel.com
Cc: Zachary Clark-williams zachary.clark-williams@intel.com
Cc: Michael D Kinney michael.d.kinney@intel.com
Signed-off-by: Abuthahir M abuthahirm@ami.com