aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/nvo.h
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2010-11-30 01:10:38 +0000
committerMichael Brown <mcb30@ipxe.org>2011-01-11 21:24:40 +0000
commit1651d4f6d7f764ff5bfafc12bd058a88e49b0ff5 (patch)
treea2ea4008bbe1d2398017e1bdd96e7e7cbc20d1e1 /src/include/ipxe/nvo.h
parent8f8b55f18728e2cf95909e9eb3c361e60d4d3827 (diff)
downloadipxe-1651d4f6d7f764ff5bfafc12bd058a88e49b0ff5.tar.gz
[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/ipxe/nvo.h')
-rw-r--r--src/include/ipxe/nvo.h23
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 );