Merged
Conversation
Consume build number when it provided in version fourth field. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Adhere to standard format. Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
The struct sizes in the library interface are currently aligned according to the environment and compiler, which complicates calling library functions from managed environments. To address this issue, a breaking change has been introduced that explicitly specifies struct alignment. Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
C# OOP wrapper Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
Working example demonstrating how to use C# wrapper to communicate with FW and driver Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
Add new logger type Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
New logger logic for Windows Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
new logger logic for EFI Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
Update to libmei 1.7.0 Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
Implement new logger for Linux Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
C# logger callback implementation with examples Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
Update CHANGELOG.md Signed-off-by: Abliyev, Reuven <reuven.abliyev@intel.com>
| handle->log_callback2(is_error, msg); | ||
| } | ||
|
|
||
| static TEESTATUS TeeInitFullInt(IN OUT PTEEHANDLE handle, IN const GUID* guid, |
Check warning
Code scanning / CodeQL
Poorly documented large function Warning
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 8 months ago
To address the issue, we will add detailed comments to the TeeInitFullInt function. These comments will include:
- A function-level comment describing the purpose of the function, its parameters, and its return value.
- Inline comments explaining the logic and purpose of key code blocks within the function.
The goal is to make the function easier to understand without altering its functionality. The comments will follow standard C documentation practices.
Suggested changeset
1
src/linux/metee_linux.c
| @@ -105,2 +105,19 @@ | ||
|
|
||
| /** | ||
| * TeeInitFullInt - Initializes a TEE handle with the specified parameters. | ||
| * | ||
| * @handle: Pointer to the TEE handle to initialize. Must not be NULL. | ||
| * @guid: Pointer to the GUID identifying the TEE service. Must not be NULL. | ||
| * @device: The device address structure specifying the TEE device. | ||
| * @log_level: Logging level (e.g., TEE_LOG_LEVEL_VERBOSE). | ||
| * @log_callback: Callback function for logging messages. | ||
| * @log_callback2: Callback function for extended logging messages. | ||
| * | ||
| * This function sets up the TEE handle by initializing internal structures, | ||
| * opening the specified TEE device, and configuring logging callbacks. | ||
| * It performs various checks and returns an appropriate status code | ||
| * indicating success or failure. | ||
| * | ||
| * Return: TEESTATUS indicating the result of the initialization. | ||
| */ | ||
| static TEESTATUS TeeInitFullInt(IN OUT PTEEHANDLE handle, IN const GUID* guid, | ||
| @@ -110,2 +127,3 @@ | ||
| { | ||
| /* Internal structure for Linux-specific TEE operations */ | ||
| struct metee_linux_intl *intl; | ||
| @@ -113,2 +131,3 @@ | ||
| int rc; | ||
| /* Enable verbose logging if the log level is set to verbose */ | ||
| bool verbose = (log_level == TEE_LOG_LEVEL_VERBOSE); |
Copilot is powered by AI and may make mistakes. Always verify output.
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.
No description provided.