]>
Commit | Line | Data |
---|---|---|
300a759d JR |
1 | diff -ur lin_tape-3.0.18/Makefile lin_tape-3.0.18-ifdefs/Makefile |
2 | --- lin_tape-3.0.18/Makefile 2017-05-09 21:11:32.977092391 +0200 | |
3 | +++ lin_tape-3.0.18-ifdefs/Makefile 2017-05-09 21:05:59.610307494 +0200 | |
65107090 | 4 | @@ -20,27 +20,6 @@ |
6986ddb6 JR |
5 | lin_tape-objs := join.o lin_tape_scsi_config.o lin_tape_scsi_tape.o lin_tape_scsi_trace.o \ |
6 | lin_tape_ioctl_tape.o lin_tape_ioctl_changer.o lin_tape_extra_ioctl.o | |
7 | ||
8 | -RHELRELEASE := $(shell [ -f "/etc/redhat-release" ] && echo 1 || echo 0) | |
9 | -ifeq ($(RHELRELEASE), 1) | |
10 | -KERNELDIR ?= /lib/modules/$(shell uname -r)/build | |
300a759d | 11 | -KERNELVER = $(shell uname -r 2>/dev/null|sed "s/[\.-]/_/g"|sed "s/\([0-9]*_[0-9]*_[0-9]*_[0-9]*\).*/\1/") |
6986ddb6 JR |
12 | -EXTRA_CFLAGS += -DKERNELVERSION_${KERNELVER} |
13 | -else | |
65107090 JR |
14 | -UBUNTURELEASE := $(shell [ -f "/etc/os-release" ] && grep -qi Ubuntu /etc/os-release && echo 1 || echo 0) |
15 | -ifeq ($(UBUNTURELEASE), 1) | |
16 | -EXTRA_CFLAGS += -DUBUNTUVERSION | |
17 | -else | |
6986ddb6 | 18 | -EXTRA_CFLAGS += -DSLESVERSION |
65107090 JR |
19 | -KERNELDIR ?= /lib/modules/$(shell uname -r)/build |
20 | -KERNELVER = $(shell uname -r 2>/dev/null|sed "s/[\.-]/_/g"|sed "s/\([0-9]*_[0-9]*_[0-9]*_[0-9]*\).*/\1/") | |
21 | -EXTRA_CFLAGS += -DSLESKERNEL_${KERNELVER} | |
22 | -SLESSP2 := $(shell grep -qi SP2 /etc/*release && echo 1 || echo 0) | |
23 | -ifeq ($(SLESSP2), 1) | |
24 | -EXTRA_CFLAGS += -DSLESSP2 | |
25 | -endif | |
26 | -endif | |
6986ddb6 | 27 | -endif |
300a759d JR |
28 | - |
29 | ifeq ($(SFMP), 1) | |
30 | EXTRA_CFLAGS += -DSFMPENABLED | |
31 | endif | |
32 | diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h | |
33 | --- lin_tape-3.0.18/pfo.h 2017-02-23 19:14:41.000000000 +0100 | |
34 | +++ lin_tape-3.0.18-ifdefs/pfo.h 2017-05-09 21:06:34.117699008 +0200 | |
fda6bd2d | 35 | @@ -26,133 +26,6 @@ |
6986ddb6 JR |
36 | * will build for various releases of Linux. This is how |
37 | * we track different versions using ifdef in the source. | |
38 | */ | |
39 | -#ifdef KERNELVERSION_2_6_32_220 | |
40 | -#define BEFORE_RH_63 1 | |
41 | -#define BEFORE_RH_64 1 | |
42 | -#define BEFORE_RH_65 1 | |
43 | -#define BEFORE_RH_66 1 | |
44 | -#define BEFORE_RH_67 1 | |
45 | -#define BEFORE_RH_70 1 | |
46 | -#define BEFORE_RH_71 1 | |
300a759d | 47 | -#define BEFORE_RH_72 1 |
6986ddb6 JR |
48 | -#endif |
49 | -#ifdef KERNELVERSION_2_6_32_279 | |
50 | -#define AFTER_RH_62 1 | |
51 | -#define BEFORE_RH_64 1 | |
52 | -#define BEFORE_RH_65 1 | |
53 | -#define BEFORE_RH_66 1 | |
54 | -#define BEFORE_RH_67 1 | |
55 | -#define BEFORE_RH_70 1 | |
56 | -#define BEFORE_RH_71 1 | |
300a759d | 57 | -#define BEFORE_RH_72 1 |
6986ddb6 JR |
58 | -#endif |
59 | -#ifdef KERNELVERSION_2_6_32_358 | |
60 | -#define AFTER_RH_62 1 | |
61 | -#define AFTER_RH_63 1 | |
62 | -#define BEFORE_RH_65 1 | |
63 | -#define BEFORE_RH_66 1 | |
64 | -#define BEFORE_RH_67 1 | |
65 | -#define BEFORE_RH_70 1 | |
300a759d | 66 | -#define BEFORE_RH_72 1 |
6986ddb6 JR |
67 | -#endif |
68 | -#ifdef KERNELVERSION_2_6_32_431 | |
69 | -#define AFTER_RH_62 1 | |
70 | -#define AFTER_RH_63 1 | |
71 | -#define AFTER_RH_64 1 | |
72 | -#define BEFORE_RH_66 1 | |
73 | -#define BEFORE_RH_67 1 | |
74 | -#define BEFORE_RH_70 1 | |
75 | -#define BEFORE_RH_71 1 | |
300a759d | 76 | -#define BEFORE_RH_72 1 |
6986ddb6 JR |
77 | -#endif |
78 | -#ifdef KERNELVERSION_2_6_32_504 | |
79 | -#define AFTER_RH_62 1 | |
80 | -#define AFTER_RH_63 1 | |
81 | -#define AFTER_RH_64 1 | |
82 | -#define AFTER_RH_65 1 | |
83 | -#define BEFORE_RH_67 1 | |
84 | -#define BEFORE_RH_70 1 | |
85 | -#define BEFORE_RH_71 1 | |
300a759d | 86 | -#define BEFORE_RH_72 1 |
6986ddb6 JR |
87 | -#endif |
88 | -#ifdef KERNELVERSION_2_6_32_573 | |
89 | -#define AFTER_RH_62 1 | |
90 | -#define AFTER_RH_63 1 | |
91 | -#define AFTER_RH_64 1 | |
92 | -#define AFTER_RH_65 1 | |
93 | -#define AFTER_RH_66 1 | |
94 | -#define BEFORE_RH_70 1 | |
95 | -#define BEFORE_RH_71 1 | |
300a759d JR |
96 | -#define BEFORE_RH_72 1 |
97 | -#endif | |
98 | -#ifdef KERNELVERSION_2_6_32_642 | |
99 | -#define AFTER_RH_62 1 | |
100 | -#define AFTER_RH_63 1 | |
101 | -#define AFTER_RH_64 1 | |
102 | -#define AFTER_RH_65 1 | |
103 | -#define AFTER_RH_66 1 | |
9752ce8d | 104 | -#define AFTER_RH_67 1 |
300a759d JR |
105 | -#define BEFORE_RH_70 1 |
106 | -#define BEFORE_RH_71 1 | |
107 | -#define BEFORE_RH_72 1 | |
6986ddb6 | 108 | -#endif |
fda6bd2d JR |
109 | -#ifdef KERNELVERSION_2_6_32_696 |
110 | -#define AFTER_RH_62 1 | |
111 | -#define AFTER_RH_63 1 | |
112 | -#define AFTER_RH_64 1 | |
113 | -#define AFTER_RH_65 1 | |
114 | -#define AFTER_RH_66 1 | |
115 | -#define AFTER_RH_67 1 | |
116 | -#define AFTER_RH_68 1 | |
117 | -#define BEFORE_RH_70 1 | |
118 | -#define BEFORE_RH_71 1 | |
119 | -#define BEFORE_RH_72 1 | |
120 | -#endif | |
6986ddb6 JR |
121 | -#ifdef KERNELVERSION_3_10_0_123 |
122 | -#define AFTER_RH_62 1 | |
123 | -#define AFTER_RH_63 1 | |
124 | -#define AFTER_RH_64 1 | |
125 | -#define AFTER_RH_65 1 | |
126 | -#define AFTER_RH_66 1 | |
127 | -#define AFTER_RH_67 1 | |
128 | -#define AFTER_RH_6x 1 | |
129 | -#define BEFORE_RH_71 1 | |
130 | -#endif | |
131 | -#ifdef KERNELVERSION_3_10_0_229 | |
132 | -#define AFTER_RH_62 1 | |
133 | -#define AFTER_RH_63 1 | |
134 | -#define AFTER_RH_64 1 | |
135 | -#define AFTER_RH_65 1 | |
136 | -#define AFTER_RH_66 1 | |
137 | -#define AFTER_RH_67 1 | |
138 | -#define AFTER_RH_6x 1 | |
139 | -#define AFTER_RH_70 1 | |
140 | -#define BEFORE_RH_72 1 | |
141 | -#endif | |
142 | -#ifdef KERNELVERSION_3_10_0_327 | |
9752ce8d JR |
143 | -#define AFTER_RH_62 1 |
144 | -#define AFTER_RH_63 1 | |
145 | -#define AFTER_RH_64 1 | |
146 | -#define AFTER_RH_65 1 | |
147 | -#define AFTER_RH_66 1 | |
148 | -#define AFTER_RH_67 1 | |
149 | -#define AFTER_RH_6x 1 | |
150 | -#define AFTER_RH_70 1 | |
151 | -#define AFTER_RH_71 1 | |
152 | -#endif | |
153 | -#ifdef KERNELVERSION_3_10_0_514 | |
fda6bd2d JR |
154 | -#define AFTER_RH_62 1 |
155 | -#define AFTER_RH_63 1 | |
156 | -#define AFTER_RH_64 1 | |
157 | -#define AFTER_RH_65 1 | |
158 | -#define AFTER_RH_66 1 | |
159 | -#define AFTER_RH_67 1 | |
160 | -#define AFTER_RH_6x 1 | |
161 | -#define AFTER_RH_70 1 | |
162 | -#define AFTER_RH_71 1 | |
163 | -#define AFTER_RH_72 1 | |
164 | -#endif | |
165 | -#ifdef KERNELVERSION_3_10_0_693 | |
6986ddb6 JR |
166 | #define AFTER_RH_62 1 |
167 | #define AFTER_RH_63 1 | |
168 | #define AFTER_RH_64 1 | |
300a759d | 169 | @@ -126,7 +35,6 @@ |
300a759d | 170 | #define AFTER_RH_71 1 |
9752ce8d | 171 | #define AFTER_RH_72 1 |
fda6bd2d | 172 | #define AFTER_RH_73 1 |
6986ddb6 JR |
173 | -#endif |
174 | ||
175 | /* Misc defines needed so source is same for all versions of Linux */ | |
176 | #ifndef SDEV_TRANSPORT_OFFLINE |