xref: /minix/minix/drivers/usb/usb_storage/common.h (revision 433d6423)
1 /*
2  * Whatever is commonly used in mass_storage driver, should be here
3  */
4 
5 #ifndef _COMMON_H_
6 #define _COMMON_H_
7 
8 /*---------------------------*
9  *  commonly used headers:   *
10  *---------------------------*/
11 #include <stdlib.h> /* For things, like EXIT_*, NULL, ... */
12 #include <stdio.h>
13 
14 /*---------------------------*
15  *  commonly used defines:   *
16  *---------------------------*/
17 #define THIS_EXEC_NAME "usb_storage"
18 #define MASS_MSG(...) do {						\
19 	printf(THIS_EXEC_NAME": ");					\
20 	printf(__VA_ARGS__);						\
21 	printf("; %s:%d\n", __func__, __LINE__);			\
22 	} while(0)
23 
24 /*---------------------------*
25  *  debug helpers:           *
26  *---------------------------*/
27 #ifdef MASS_DEBUG
28 #define MASS_DEBUG_MSG		MASS_MSG
29 #define MASS_DEBUG_DUMP		printf("%s():%d\n", __func__, __LINE__)
30 #else
31 #define MASS_DEBUG_MSG(...)
32 #define MASS_DEBUG_DUMP
33 #endif
34 
35 #endif /* !_COMMON_H_ */
36