UBUNTU: Ubuntu-2.6.38-12.51
[linux-flexiantxendom0-natty.git] / ubuntu / compcache / compat.h
1 #ifndef _CCACHE_COMPAT_H_
2 #define _CCACHE_COMPAT_H_
3
4 #include <linux/version.h>
5
6 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,23)
7 #define BIO_IO_ERROR(bio)       bio_io_error(bio, PAGE_SIZE)
8 #define BIO_ENDIO(bio, error)   bio_endio(bio, PAGE_SIZE, error)
9 #else
10 #define BIO_IO_ERROR(bio)       bio_io_error(bio)
11 #define BIO_ENDIO(bio, error)   bio_endio(bio, error)
12 #endif
13
14 #ifndef pr_err
15 #define pr_err(fmt, arg...) \
16         printk(KERN_ERR fmt, ##arg)
17 #endif
18
19 #ifndef pr_warning
20 #define pr_warning(fmt, arg...) \
21         printk(KERN_WARNING fmt, ##arg)
22 #endif
23
24 #ifndef pr_info
25 #define pr_info(fmt, arg...) \
26         printk(KERN_ERR fmt, ##arg)
27 #endif
28
29 #ifdef bio_discard
30 #define SWAP_DISCARD_SUPPORTED
31 #endif
32
33 #endif
34