6 * Non-volatile stored options
10 FILE_LICENCE ( GPL2_OR_LATER );
13 #include <ipxe/dhcpopts.h>
14 #include <ipxe/settings.h>
20 * A block of non-volatile stored options
24 struct settings settings;
25 /** Underlying non-volatile storage device */
26 struct nvs_device *nvs;
27 /** Address within NVS device */
29 /** Length of options data */
31 /** Option-containing data */
34 * Resize non-volatile stored option block
36 * @v nvo Non-volatile options block
38 * @ret rc Return status code
40 int ( * resize ) ( struct nvo_block *nvo, size_t len );
41 /** DHCP options block */
42 struct dhcp_options dhcpopts;
45 /** Name of non-volatile options settings block */
46 #define NVO_SETTINGS_NAME "nvo"
48 extern int nvo_applies ( struct settings *settings,
49 const struct setting *setting );
50 extern void nvo_init ( struct nvo_block *nvo, struct nvs_device *nvs,
51 size_t address, size_t len,
52 int ( * resize ) ( struct nvo_block *nvo, size_t len ),
53 struct refcnt *refcnt );
54 extern int register_nvo ( struct nvo_block *nvo, struct settings *parent );
55 extern void unregister_nvo ( struct nvo_block *nvo );
57 #endif /* _IPXE_NVO_H */