b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | /* |
| 2 | * debug.h |
| 3 | * |
| 4 | * debug functions |
| 5 | * head file |
| 6 | * |
| 7 | * Copyright (C) knightray@gmail.com |
| 8 | * |
| 9 | * SPDX-License-Identifier: GPL-2.0+ |
| 10 | */ |
| 11 | #ifndef _DEBUG_H |
| 12 | #define _DEBUG_H |
| 13 | |
| 14 | #include "comdef.h" |
| 15 | /* |
| 16 | #define DBG_CACHE |
| 17 | #define DBG_DIR |
| 18 | #define DBG_DIRENT |
| 19 | #define DBG_FAT |
| 20 | #define DBG_FILE |
| 21 | #define DBG_INITFS |
| 22 | */ |
| 23 | #define DBG printf |
| 24 | #define WARN printf |
| 25 | #define ERR printf |
| 26 | #define INFO printf |
| 27 | |
| 28 | #define ASSERT(f) if(!(f)) { \ |
| 29 | printf("ASSERT failed at %s():%d\n", __FUNCTION__, __LINE__); \ |
| 30 | /* exit(0); */ \ |
| 31 | } |
| 32 | |
| 33 | void print_sector(ubyte * secbuf, ubyte bychar); |
| 34 | static inline void nulldbg(char * fmt, ...) |
| 35 | { |
| 36 | } |
| 37 | |
| 38 | #endif |