Files
BPI-M2C/source_sync_rls_25c/source/unisoc/modules/rootfs-antirollback/log.h
T
2026-09-22 09:38:26 +08:00

44 lines
1.5 KiB
C
Executable File

/*
* SPDX-License-Identifier: LicenseRef-Unisoc-General-1.0
*
* Copyright 2016-2024 Unisoc (Shanghai) Technologies Co., Ltd
*
* Licensed under the Unisoc General Software License, version 1.0 (the License);
* You may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.unisoc.com/en_us/license/UNISOC_GENERAL_LICENSE_V1.0-EN_US
*
* Software distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OF ANY KIND, either express or implied.
* See the Unisoc General Software License, version 1.0 for more details.
*/
#ifndef _LOG_H_
#define _LOG_H_
#include <stdio.h>
#include <stdarg.h>
#define LOG_TAG "rootfs-anti-rollback"
#define DEBUG 1
#if DEBUG
#define LOGD(fmt, ...) \
{ \
fprintf(stderr, "%s: %d: " fmt, LOG_TAG, __LINE__, ##__VA_ARGS__); \
fprintf(stderr, "\n"); \
}
#else
#define LOGD(fmt, ...) {;}
#endif
#define LOGE(fmt, ...) \
{ \
fprintf(stderr, "%s: %d: " fmt, LOG_TAG, __LINE__, ##__VA_ARGS__); \
fprintf(stderr, "\n"); \
}
#endif