[PATCH 42/44] block: define BLK_TYPE_COUNT as last enum blk_type value

Ahmad Fatoum a.fatoum at barebox.org
Mon Aug 11 05:28:22 PDT 2025


This makes it easier for code that consumes this information to size
arrays that hold statistics.

Signed-off-by: Ahmad Fatoum <a.fatoum at barebox.org>
---
 include/block.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/block.h b/include/block.h
index b66830c8943e..fc7a0a32fb2d 100644
--- a/include/block.h
+++ b/include/block.h
@@ -28,6 +28,7 @@ enum blk_type {
 	BLK_TYPE_NVME,
 	BLK_TYPE_VIRTUAL,
 	BLK_TYPE_MMC,
+	BLK_TYPE_COUNT,
 };
 
 const char *blk_type_str(enum blk_type);
-- 
2.39.5




More information about the barebox mailing list