developer | 1d31274 | 2023-09-11 11:05:46 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright (C) 2021 MediaTek Incorporation. All Rights Reserved. |
| 4 | * |
| 5 | * Author: Alvin Kuo <Alvin.Kuo@mediatek.com> |
| 6 | */ |
| 7 | |
| 8 | #ifndef __COMMON_H__ |
| 9 | #define __COMMON_H__ |
| 10 | |
| 11 | #include <sys/types.h> |
| 12 | #include <time.h> |
| 13 | |
| 14 | #define LOG_FMT(FMT) "[TOPS_TOOL] [%s]: " FMT, __func__ |
| 15 | |
| 16 | #define ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) |
| 17 | |
| 18 | int time_to_str(time_t *time_sec, char *time_str, unsigned int time_str_size); |
| 19 | int mkdir_p(const char *path, mode_t mode); |
| 20 | |
| 21 | #endif /* __COMMON_H__ */ |