diff options
author | Rob Austein <sra@hactrn.net> | 2017-05-28 12:11:31 -0400 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2017-05-28 12:11:31 -0400 |
commit | f59533ee9807832ea5ca7dd5492592c8991a9f34 (patch) | |
tree | cdca6a55bd7b78721ea03057777911e249ee63c3 /ks.h | |
parent | 5eccb3e6d7c27149a0092de48eb21baa495879cb (diff) |
Further keystore cleanup and consolidation.
Still not yet expected to compile, much less run, but getting closer.
Diffstat (limited to 'ks.h')
-rw-r--r-- | ks.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -186,8 +186,10 @@ typedef struct { * themselves are stored, that's up to the keystore driver. */ +typedef struct hal_ks_driver hal_ks_driver_t; + struct hal_ks { - const hal_ks_driver_t *driver; + const hal_ks_driver_t *driver;/* Must be first */ unsigned size; /* Blocks in keystore */ unsigned used; /* How many blocks are in use */ uint16_t *index; /* Index/freelist array */ @@ -209,10 +211,9 @@ struct hal_ks { * function pointers and a set of static inline wrapper functions. */ -typedef struct hal_ks_driver hal_ks_driver_t; - #define KS_DRIVER_END_LIST #define KS_DRIVER_METHODS \ + KS_DRIVER_METHOD(init, hal_ks_t *ks, const int alloc) \ KS_DRIVER_METHOD(read, hal_ks_t *ks, const unsigned blockno, hal_ks_block_t *block) \ KS_DRIVER_METHOD(write, hal_ks_t *ks, const unsigned blockno, hal_ks_block_t *block) \ KS_DRIVER_METHOD(deprecate, hal_ks_t *ks, const unsigned blockno) \ |