diff options
| author | Michael Brown | 2010-11-30 02:10:38 +0100 |
|---|---|---|
| committer | Michael Brown | 2011-01-11 22:24:40 +0100 |
| commit | 1651d4f6d7f764ff5bfafc12bd058a88e49b0ff5 (patch) | |
| tree | a2ea4008bbe1d2398017e1bdd96e7e7cbc20d1e1 /src/include | |
| parent | [nvs] Allow for non-volatile storage devices without block boundaries (diff) | |
| download | ipxe-1651d4f6d7f764ff5bfafc12bd058a88e49b0ff5.tar.gz ipxe-1651d4f6d7f764ff5bfafc12bd058a88e49b0ff5.tar.xz ipxe-1651d4f6d7f764ff5bfafc12bd058a88e49b0ff5.zip | |
[nvo] Remove the non-volatile options fragment list
Since its implementation several years ago, no driver has used a
fragment list containing more than a single fragment. Simplify the
NVO core and the drivers that use it by removing the whole concept of
the fragment list, and using a simple (address,length) pair instead.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/ipxe/nvo.h | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/src/include/ipxe/nvo.h b/src/include/ipxe/nvo.h index 0a0222b38..1fdc12ccb 100644 --- a/src/include/ipxe/nvo.h +++ b/src/include/ipxe/nvo.h @@ -17,16 +17,6 @@ struct nvs_device; struct refcnt; /** - * A fragment of a non-volatile storage device used for stored options - */ -struct nvo_fragment { - /** Starting address of fragment within NVS device */ - unsigned int address; - /** Length of fragment */ - size_t len; -}; - -/** * A block of non-volatile stored options */ struct nvo_block { @@ -34,13 +24,10 @@ struct nvo_block { struct settings settings; /** Underlying non-volatile storage device */ struct nvs_device *nvs; - /** List of option-containing fragments - * - * The list is terminated by a fragment with a length of zero. - */ - struct nvo_fragment *fragments; - /** Total length of option-containing fragments */ - size_t total_len; + /** Address within NVS device */ + unsigned int address; + /** Length of options data */ + size_t len; /** Option-containing data */ void *data; /** DHCP options block */ @@ -48,7 +35,7 @@ struct nvo_block { }; extern void nvo_init ( struct nvo_block *nvo, struct nvs_device *nvs, - struct nvo_fragment *fragments, struct refcnt *refcnt ); + size_t address, size_t len, struct refcnt *refcnt ); extern int register_nvo ( struct nvo_block *nvo, struct settings *parent ); extern void unregister_nvo ( struct nvo_block *nvo ); |
