blob: 339b8e1b20182309ca7adfb8cb029afc73a629f3 [file] [log] [blame]
developer1d312742023-09-11 11:05:46 +08001/* 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
18int time_to_str(time_t *time_sec, char *time_str, unsigned int time_str_size);
19int mkdir_p(const char *path, mode_t mode);
20
21#endif /* __COMMON_H__ */