/*1*2* Copyright (c) International Business Machines Corp., 2000,20023* Modified by Steve French ([email protected])4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License as published by7* the Free Software Foundation; either version 2 of the License, or8* (at your option) any later version.9*10* This program is distributed in the hope that it will be useful,11* but WITHOUT ANY WARRANTY; without even the implied warranty of12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See13* the GNU General Public License for more details.14*15* You should have received a copy of the GNU General Public License16* along with this program; if not, write to the Free Software17* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA18*19*/20#define CIFS_DEBUG /* BB temporary */2122#ifndef _H_CIFS_DEBUG23#define _H_CIFS_DEBUG2425void cifs_dump_mem(char *label, void *data, int length);26#ifdef CONFIG_CIFS_DEBUG227#define DBG2 228void cifs_dump_detail(struct smb_hdr *);29void cifs_dump_mids(struct TCP_Server_Info *);30#else31#define DBG2 032#endif33extern int traceSMB; /* flag which enables the function below */34void dump_smb(struct smb_hdr *, int);35#define CIFS_INFO 0x0136#define CIFS_RC 0x0237#define CIFS_TIMER 0x043839/*40* debug ON41* --------42*/43#ifdef CIFS_DEBUG4445/* information message: e.g., configuration, major event */46extern int cifsFYI;47#define cifsfyi(fmt, arg...) \48do { \49if (cifsFYI & CIFS_INFO) \50printk(KERN_DEBUG "%s: " fmt "\n", __FILE__, ##arg); \51} while (0)5253#define cFYI(set, fmt, arg...) \54do { \55if (set) \56cifsfyi(fmt, ##arg); \57} while (0)5859#define cifswarn(fmt, arg...) \60printk(KERN_WARNING fmt "\n", ##arg)6162/* debug event message: */63extern int cifsERROR;6465#define cEVENT(fmt, arg...) \66do { \67if (cifsERROR) \68printk(KERN_EVENT "%s: " fmt "\n", __FILE__, ##arg); \69} while (0)7071/* error event message: e.g., i/o error */72#define cifserror(fmt, arg...) \73do { \74if (cifsERROR) \75printk(KERN_ERR "CIFS VFS: " fmt "\n", ##arg); \76} while (0)7778#define cERROR(set, fmt, arg...) \79do { \80if (set) \81cifserror(fmt, ##arg); \82} while (0)8384/*85* debug OFF86* ---------87*/88#else /* _CIFS_DEBUG */89#define cERROR(set, fmt, arg...)90#define cEVENT(fmt, arg...)91#define cFYI(set, fmt, arg...)92#define cifserror(fmt, arg...)93#endif /* _CIFS_DEBUG */9495#endif /* _H_CIFS_DEBUG */969798