-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[WIP] Shell protocol refactor #6248
base: master
Are you sure you want to change the base?
[WIP] Shell protocol refactor #6248
Conversation
This patch prepares the ShellPkg for the changes that follow, where we refactor the core shell functionality or environment into a library, allowing it to be consumed by other apps. The purpose is to allow tools written for the shell, in development environments, to be easily modified to work in production. This patchset also allows us to reduce the coupling between the UI, the user interaction, and the shell protocol (etc) internals, but for the moment, this hasn't been done. Signed-off-by: Benjamin Doron <[email protected]>
…raction This library contains all aspects that handle the user's interaction with the shell app, from command history and display output, to user-controlled settings like the page break. The NULL instance is only to be used for automation, not with the shell. This library is a dependency for the follow-ups, but due to the current coupling, it can't be built on its own. A fair portion of it is a copy and refactor of the shell app. Signed-off-by: Benjamin Doron <[email protected]>
…shell' This patch represents the primary patch of this series: By linking against this library, a shell-like environment will be available to the consuming app. It's mainly a copy and refactor of the shell app. Signed-off-by: Benjamin Doron <[email protected]>
Signed-off-by: Benjamin Doron <[email protected]>
Signed-off-by: Benjamin Doron <[email protected]>
⚠ WARNING: Cannot add some reviewers: A user specified as a reviewer for this PR is not a collaborator of the repository. Please add them as a collaborator to the repository so they can be requested in the future. Non-collaborators requested: Attn Admins: Admin Instructions:
|
I still want to go back and review how the headers are separated between public and private. This is mostly out of WIP status, but do not merge yet. |
// | ||
ASSERT (TabCompleteList != NULL); | ||
if (TabCurrent == NULL) { | ||
TabCurrent = (EFI_SHELL_FILE_INFO *)GetFirstNode (&TabCompleteList->Link); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
if (TabCurrent == NULL) { | ||
TabCurrent = (EFI_SHELL_FILE_INFO *)GetFirstNode (&TabCompleteList->Link); | ||
} else { | ||
TabCurrent = (EFI_SHELL_FILE_INFO *)GetNextNode (&TabCompleteList->Link, &TabCurrent->Link); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
// | ||
Column = (StartColumn + TabUpdatePos) % TotalColumn; | ||
Row -= (StartColumn + StringCurPos) / TotalColumn - (StartColumn + TabUpdatePos) / TotalColumn; | ||
OutputLength = StrLen (TabCurrent->FileName); |
Check failure
Code scanning / CodeQL
Returned pointer not checked High
Description
In this PR, we refactor the core shell functionality or environment into a library,
allowing it to be consumed by other apps.
The purpose is to allow tools written for the shell, in development
environments, to be easily modified to work in automated ways in production.
This patchset also allows us to reduce the coupling between the UI,
the user interaction, and the shell protocol (etc) internals, but for
the moment, this hasn't been done.
How This Was Tested
UefiPayload was built and booted into the shell.
Integration Instructions
If you're developing an out-of-tree platform, add library definitions for ShellProtocolInteractivityLib and ShellProtocolsLib when this is merged.