From 1651d4f6d7f764ff5bfafc12bd058a88e49b0ff5 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 30 Nov 2010 01:10:38 +0000 Subject: [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 --- src/include/ipxe/nvo.h | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) (limited to 'src/include') 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 @@ -16,16 +16,6 @@ FILE_LICENCE ( GPL2_OR_LATER ); 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 */ @@ -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 ); -- cgit v1.2.3-55-g7522