1/* 2 * Copyright 2017, Ch��� V�� Gia Hy, cvghy116@gmail.com. 3 * Copyright 2011, J��r��me Duval, korli@users.berlios.de. 4 * Copyright 2008-2014, Axel D��rfler, axeld@pinc-software.de. 5 * Copyright 2005-2007, Ingo Weinhold, bonefish@cs.tu-berlin.de. 6 * Copyright 2020, Shubham Bhagat, shubhambhagat111@yahoo.com 7 * This file may be used under the terms of the MIT License. 8 */ 9#ifndef _DEBUG_H_ 10#define _DEBUG_H_ 11 12#define TRACE_XFS 13#ifdef TRACE_XFS 14#define TRACE(x...) dprintf("\n\33[34mxfs:\33[0m " x) 15#ifdef FS_SHELL 16#define ASSERT(x) \ 17 { if (!(x)) kernel_debugger("xfs: assert failed: " #x "\n"); } 18#endif 19#else 20#define TRACE(x...) 21#ifdef FS_SHELL 22#define ASSERT(x) 23#endif 24#endif 25#define ERROR(x...) dprintf("\n\33[34mxfs:\33[0m " x) 26 27#endif 28