Skip to content

Conversation

@asemjonovs
Copy link
Contributor

Similar to logging module, allow application specific extension of shell fprintf APIs at a macro level.

@asemjonovs asemjonovs requested a review from yperess April 9, 2024 20:45
@asemjonovs asemjonovs force-pushed the tokenize_shell branch 2 times, most recently from 3e37dbb to b57aea6 Compare April 10, 2024 14:41
Similar to logging module, allow application specific extension of
shell fprintf APIs at a macro level.

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
@asemjonovs asemjonovs marked this pull request as ready for review April 10, 2024 14:49
@zephyrbot zephyrbot added the area: Shell Shell subsystem label Apr 10, 2024
yperess
yperess previously approved these changes Apr 10, 2024
@jakub-uC
Copy link
Contributor

@asemjonovs
I am not against this change, but may you please share some use cases for this? I am just curious :)

@asemjonovs
Copy link
Contributor Author

@asemjonovs I am not against this change, but may you please share some use cases for this? I am just curious :)

Sure! I'm working on a project where I'm converting our text based logging over to tokenized logging. I found that we can get additional space savings by also tokenizing the strings that are used in the shell API's as well, since its similar to logging for us. Since the tokenizing occurs at build time, I need to intercept the macro to tokenize the string.

jakub-uC
jakub-uC previously approved these changes Apr 11, 2024
Copy link
Member

@nashif nashif left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not a big fan of this open-ended extension method, but if we want to go with this, we would like to see a sample using this in the tree, similar to how it is done for logging. please.

Verify customized shell macro APIs

Signed-off-by: Al Semjonovs <asemjonovs@google.com>
@asemjonovs asemjonovs dismissed stale reviews from jakub-uC and yperess via c7bef6f April 12, 2024 15:20
@asemjonovs
Copy link
Contributor Author

not a big fan of this open-ended extension method, but if we want to go with this, we would like to see a sample using this in the tree, similar to how it is done for logging. please.

Done. Yeah, I'm not a huge fan of this as well, but I'm not sure if there's a better way?

@asemjonovs
Copy link
Contributor Author

@nashif - could you give this another pass?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Shell Shell subsystem

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants