summaryrefslogtreecommitdiffstats
path: root/src/include/gpxe/nvs.h
diff options
context:
space:
mode:
authorMichael Brown2006-11-29 03:41:08 +0100
committerMichael Brown2006-11-29 03:41:08 +0100
commit4cd56820ea8767d0a6e7444e1b453a69322f8f2e (patch)
treec80290d85e7969f49c763a2f8c41587177e69cd2 /src/include/gpxe/nvs.h
parentMake the "drive number" option apply to iSCSI as well as AoE (diff)
downloadipxe-4cd56820ea8767d0a6e7444e1b453a69322f8f2e.tar.gz
ipxe-4cd56820ea8767d0a6e7444e1b453a69322f8f2e.tar.xz
ipxe-4cd56820ea8767d0a6e7444e1b453a69322f8f2e.zip
Basic non-volatile storage support
Diffstat (limited to 'src/include/gpxe/nvs.h')
-rw-r--r--src/include/gpxe/nvs.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/include/gpxe/nvs.h b/src/include/gpxe/nvs.h
new file mode 100644
index 00000000..f8a80787
--- /dev/null
+++ b/src/include/gpxe/nvs.h
@@ -0,0 +1,30 @@
+#ifndef _GPXE_NVS_H
+#define _GPXE_NVS_H
+
+/** @file
+ *
+ * Non-volatile storage
+ *
+ */
+
+#include <stdint.h>
+
+struct nvs_operations;
+
+struct nvs_device {
+ struct dhcp_option_block *options;
+ size_t len;
+ struct nvs_operations *op;
+};
+
+struct nvs_operations {
+ int ( * read ) ( struct nvs_device *nvs, unsigned int offset,
+ void *data, size_t len );
+ int ( * write ) ( struct nvs_device *nvs, unsigned int offset,
+ const void *data, size_t len );
+};
+
+extern int nvs_register ( struct nvs_device *nvs );
+extern void nvs_unregister ( struct nvs_device *nvs );
+
+#endif /* _GPXE_NVS_H */