From 1d630f8e36effef914235ca9a891e4880612a034 Mon Sep 17 00:00:00 2001 From: Leah Rowe Date: Sun, 8 Mar 2026 15:06:01 +0000 Subject: util/nvmutil: set errno in xstrxcmp Signed-off-by: Leah Rowe --- util/nvmutil/nvmutil.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'util') diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 1eaa6a16..cd3d3650 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -1152,6 +1152,14 @@ xstrxcmp(const char *a, const char *b, size_t maxlen) /* * Should never reach here. This keeps compilers happy. */ + + /* + * If we do reach here, we want some way to crash + * nvmutil before writing anything to disk. + * + * It checks errno extremely obsessively. + */ + errno = EINVAL; return -1; } -- cgit v1.2.1