-
Notifications
You must be signed in to change notification settings - Fork 3k
NVStore: key management enhancements #6388
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
Conversation
- Define an enum for predefined keys (later filled by internal users of NVStore) - Add the set_alloc_key API, allocating a free key from the non predefined keys
d8ff3d9
to
b7bb29a
Compare
Seems like Jenkins failure is not related to the PR, but more to Ethernet issues. Setup problem? Known issue? |
Unfortunately the "continuous-integration/jenkins/pr-head" CI is unreliable. Usually it's not the PR's fault. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
* @param[in] buf_size Buffer size (bytes). | ||
* @param[in] buf Input Buffer. | ||
* @param[in] flags Record flags. | ||
* | ||
* @returns 0 for success, nonzero for failure. | ||
*/ | ||
int do_set(uint16_t key, uint16_t buf_size, const void *buf, uint16_t flags); | ||
int do_set(uint16_t &key, uint16_t buf_size, const void *buf, uint16_t flags); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you considered exposing do_set
as a public overload of the set
function? Letting the user chose flags would gives them more options.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't think it's the way to go here. Aim is to keep the API as simple as possible (as well as keeping the user on a short leash).
@geky Looks like it passed this time. /morph build |
Build : FAILUREBuild number : 1506 |
/morph build |
Build : SUCCESSBuild number : 1508 Triggering tests/morph test |
Exporter Build : SUCCESSBuild number : 1148 |
Test : SUCCESSBuild number : 1288 |
Description
This PR makes the following changes in NVStore:
nvstore_predefined_keys_e
enum for predefined keys (later filled by internal users of NVStore)set_alloc_key
API, allocating a free key from the non predefined keysBoth changes are required for better handling of the NVStore key management.
Pull request type