Generated v2 prefixes

This commit is contained in:
geky-bot
2024-03-08 23:23:45 +00:00
11 changed files with 174 additions and 17 deletions
+9 -6
View File
@@ -36,17 +36,18 @@ extern "C"
// Not that read-noop is not allowed. Read _must_ return a consistent (but
// may be arbitrary) value on every read.
typedef enum lfs2_emubd_badblock_behavior {
LFS2_EMUBD_BADBLOCK_PROGERROR,
LFS2_EMUBD_BADBLOCK_ERASEERROR,
LFS2_EMUBD_BADBLOCK_READERROR,
LFS2_EMUBD_BADBLOCK_PROGNOOP,
LFS2_EMUBD_BADBLOCK_ERASENOOP,
LFS2_EMUBD_BADBLOCK_PROGERROR = 0, // Error on prog
LFS2_EMUBD_BADBLOCK_ERASEERROR = 1, // Error on erase
LFS2_EMUBD_BADBLOCK_READERROR = 2, // Error on read
LFS2_EMUBD_BADBLOCK_PROGNOOP = 3, // Prog does nothing silently
LFS2_EMUBD_BADBLOCK_ERASENOOP = 4, // Erase does nothing silently
} lfs2_emubd_badblock_behavior_t;
// Mode determining how power-loss behaves during testing. For now this
// only supports a noop behavior, leaving the data on-disk untouched.
typedef enum lfs2_emubd_powerloss_behavior {
LFS2_EMUBD_POWERLOSS_NOOP,
LFS2_EMUBD_POWERLOSS_NOOP = 0, // Progs are atomic
LFS2_EMUBD_POWERLOSS_OOO = 1, // Blocks are written out-of-order
} lfs2_emubd_powerloss_behavior_t;
// Type for measuring read/program/erase operations
@@ -152,6 +153,8 @@ typedef struct lfs2_emubd {
lfs2_emubd_io_t proged;
lfs2_emubd_io_t erased;
lfs2_emubd_powercycles_t power_cycles;
lfs2_ssize_t ooo_block;
lfs2_emubd_block_t *ooo_data;
lfs2_emubd_disk_t *disk;
const struct lfs2_emubd_config *cfg;