brintos

brintos / linux-shallow public Read only

0
0
Text · 567 B · bf9ecce Raw
27 lines · c
1// SPDX-License-Identifier: GPL-2.0-only2/*3 * Copyright 2023 Red Hat4 */5 6#include "permassert.h"7 8#include "errors.h"9#include "logger.h"10 11int vdo_assertion_failed(const char *expression_string, const char *file_name,12			 int line_number, const char *format, ...)13{14	va_list args;15 16	va_start(args, format);17 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);22 23	va_end(args);24 25	return UDS_ASSERTION_FAILED;26}27