From 0376d8e0e88bb969c42723135477a8a8d6409e93 Mon Sep 17 00:00:00 2001 From: Charles Manning Date: Wed, 26 May 2021 10:45:13 +1200 Subject: [PATCH] Index the block state string list because the order was wrong. Thanks to Cory Wiltshire for pointing out the problem and proposing a fix. Signed-off-by: Charles Manning --- yaffs_verify.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/yaffs_verify.c b/yaffs_verify.c index ba9b9f4..e634b50 100644 --- a/yaffs_verify.c +++ b/yaffs_verify.c @@ -36,16 +36,16 @@ static int yaffs_skip_nand_verification(struct yaffs_dev *dev) } static const char * const block_state_name[] = { - "Unknown", - "Needs scan", - "Scanning", - "Empty", - "Allocating", - "Full", - "Dirty", - "Checkpoint", - "Collecting", - "Dead" + [YAFFS_BLOCK_STATE_UNKNOWN] = "Unknown", + [YAFFS_BLOCK_STATE_NEEDS_SCAN] = "Needs scan", + [YAFFS_BLOCK_STATE_SCANNING] = "Scanning", + [YAFFS_BLOCK_STATE_EMPTY] = "Empty", + [YAFFS_BLOCK_STATE_ALLOCATING] = "Allocating", + [YAFFS_BLOCK_STATE_FULL] = "Full", + [YAFFS_BLOCK_STATE_DIRTY] = "Dirty", + [YAFFS_BLOCK_STATE_CHECKPOINT] = "Checkpoint", + [YAFFS_BLOCK_STATE_COLLECTING] = "Collecting", + [YAFFS_BLOCK_STATE_DEAD] = "Dead" }; void yaffs_verify_blk(struct yaffs_dev *dev, struct yaffs_block_info *bi, int n) -- 2.30.2