1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright 2023 Red Hat
6 #include "permassert.h"
11 int vdo_assertion_failed(const char *expression_string
, const char *file_name
,
12 int line_number
, const char *format
, ...)
16 va_start(args
, format
);
18 vdo_log_embedded_message(VDO_LOG_ERR
, VDO_LOGGING_MODULE_NAME
, "assertion \"",
19 format
, args
, "\" (%s) failed at %s:%d",
20 expression_string
, file_name
, line_number
);
21 vdo_log_backtrace(VDO_LOG_ERR
);
25 return UDS_ASSERTION_FAILED
;