Skip to content

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

Merged
merged 1 commit into from
Mar 23, 2018

Conversation

davidsaada
Copy link
Contributor

@davidsaada davidsaada commented Mar 19, 2018

Description

This PR makes the following changes in NVStore:

  • Define the nvstore_predefined_keys_e 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

Both changes are required for better handling of the NVStore key management.

Pull request type

  • Feature

- 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
@davidsaada davidsaada force-pushed the david_nvstore_set_alloc_key branch from d8ff3d9 to b7bb29a Compare March 19, 2018 10:01
@davidsaada
Copy link
Contributor Author

Seems like Jenkins failure is not related to the PR, but more to Ethernet issues. Setup problem? Known issue?

@geky
Copy link
Contributor

geky commented Mar 19, 2018

Unfortunately the "continuous-integration/jenkins/pr-head" CI is unreliable. Usually it's not the PR's fault.

Copy link
Contributor

@geky geky left a 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);
Copy link
Contributor

@geky geky Mar 19, 2018

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.

Copy link
Contributor Author

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).

@cmonr
Copy link
Contributor

cmonr commented Mar 21, 2018

@geky Looks like it passed this time.

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 21, 2018

Build : FAILURE

Build number : 1506
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6388/

@0xc0170
Copy link
Contributor

0xc0170 commented Mar 21, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Mar 21, 2018

Build : SUCCESS

Build number : 1508
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/6388/

Triggering tests

/morph test
/morph uvisor-test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Mar 21, 2018

@mbed-ci
Copy link

mbed-ci commented Mar 21, 2018

@cmonr cmonr merged commit 6dc0c9d into ARMmbed:master Mar 23, 2018
@adbridge adbridge mentioned this pull request Apr 20, 2018
@davidsaada davidsaada deleted the david_nvstore_set_alloc_key branch July 9, 2018 13:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants