summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util/nvmutil/nvmutil.c8
1 files changed, 8 insertions, 0 deletions
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;
}