]> git.pld-linux.org Git - packages/lin_tape.git/blame - clean-ifdefs.patch
- up to 3.0.52
[packages/lin_tape.git] / clean-ifdefs.patch
CommitLineData
300a759d
JR
1diff -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
dc1a7dc8 4@@ -20,26 +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)
dc1a7dc8 23-ifeq ($(SLESSP2), 1)
65107090
JR
24-EXTRA_CFLAGS += -DSLESSP2
25-endif
26-endif
6986ddb6 27-endif
dc1a7dc8 28
300a759d
JR
29 ifeq ($(SFMP), 1)
30 EXTRA_CFLAGS += -DSFMPENABLED
300a759d
JR
31diff -ur lin_tape-3.0.18/pfo.h lin_tape-3.0.18-ifdefs/pfo.h
32--- lin_tape-3.0.18/pfo.h 2017-02-23 19:14:41.000000000 +0100
33+++ lin_tape-3.0.18-ifdefs/pfo.h 2017-05-09 21:06:34.117699008 +0200
fda6bd2d 34@@ -26,133 +26,6 @@
6986ddb6
JR
35 * will build for various releases of Linux. This is how
36 * we track different versions using ifdef in the source.
37 */
38-#ifdef KERNELVERSION_2_6_32_220
39-#define BEFORE_RH_63 1
40-#define BEFORE_RH_64 1
41-#define BEFORE_RH_65 1
42-#define BEFORE_RH_66 1
43-#define BEFORE_RH_67 1
44-#define BEFORE_RH_70 1
45-#define BEFORE_RH_71 1
300a759d 46-#define BEFORE_RH_72 1
6986ddb6
JR
47-#endif
48-#ifdef KERNELVERSION_2_6_32_279
49-#define AFTER_RH_62 1
50-#define BEFORE_RH_64 1
51-#define BEFORE_RH_65 1
52-#define BEFORE_RH_66 1
53-#define BEFORE_RH_67 1
54-#define BEFORE_RH_70 1
55-#define BEFORE_RH_71 1
300a759d 56-#define BEFORE_RH_72 1
6986ddb6
JR
57-#endif
58-#ifdef KERNELVERSION_2_6_32_358
59-#define AFTER_RH_62 1
60-#define AFTER_RH_63 1
61-#define BEFORE_RH_65 1
62-#define BEFORE_RH_66 1
63-#define BEFORE_RH_67 1
64-#define BEFORE_RH_70 1
300a759d 65-#define BEFORE_RH_72 1
6986ddb6
JR
66-#endif
67-#ifdef KERNELVERSION_2_6_32_431
68-#define AFTER_RH_62 1
69-#define AFTER_RH_63 1
70-#define AFTER_RH_64 1
71-#define BEFORE_RH_66 1
72-#define BEFORE_RH_67 1
73-#define BEFORE_RH_70 1
74-#define BEFORE_RH_71 1
300a759d 75-#define BEFORE_RH_72 1
6986ddb6
JR
76-#endif
77-#ifdef KERNELVERSION_2_6_32_504
78-#define AFTER_RH_62 1
79-#define AFTER_RH_63 1
80-#define AFTER_RH_64 1
81-#define AFTER_RH_65 1
82-#define BEFORE_RH_67 1
83-#define BEFORE_RH_70 1
84-#define BEFORE_RH_71 1
300a759d 85-#define BEFORE_RH_72 1
6986ddb6
JR
86-#endif
87-#ifdef KERNELVERSION_2_6_32_573
88-#define AFTER_RH_62 1
89-#define AFTER_RH_63 1
90-#define AFTER_RH_64 1
91-#define AFTER_RH_65 1
92-#define AFTER_RH_66 1
93-#define BEFORE_RH_70 1
94-#define BEFORE_RH_71 1
300a759d
JR
95-#define BEFORE_RH_72 1
96-#endif
97-#ifdef KERNELVERSION_2_6_32_642
98-#define AFTER_RH_62 1
99-#define AFTER_RH_63 1
100-#define AFTER_RH_64 1
101-#define AFTER_RH_65 1
102-#define AFTER_RH_66 1
9752ce8d 103-#define AFTER_RH_67 1
300a759d
JR
104-#define BEFORE_RH_70 1
105-#define BEFORE_RH_71 1
106-#define BEFORE_RH_72 1
6986ddb6 107-#endif
fda6bd2d
JR
108-#ifdef KERNELVERSION_2_6_32_696
109-#define AFTER_RH_62 1
110-#define AFTER_RH_63 1
111-#define AFTER_RH_64 1
112-#define AFTER_RH_65 1
113-#define AFTER_RH_66 1
114-#define AFTER_RH_67 1
115-#define AFTER_RH_68 1
116-#define BEFORE_RH_70 1
117-#define BEFORE_RH_71 1
118-#define BEFORE_RH_72 1
119-#endif
6986ddb6
JR
120-#ifdef KERNELVERSION_3_10_0_123
121-#define AFTER_RH_62 1
122-#define AFTER_RH_63 1
123-#define AFTER_RH_64 1
124-#define AFTER_RH_65 1
125-#define AFTER_RH_66 1
126-#define AFTER_RH_67 1
127-#define AFTER_RH_6x 1
128-#define BEFORE_RH_71 1
129-#endif
130-#ifdef KERNELVERSION_3_10_0_229
131-#define AFTER_RH_62 1
132-#define AFTER_RH_63 1
133-#define AFTER_RH_64 1
134-#define AFTER_RH_65 1
135-#define AFTER_RH_66 1
136-#define AFTER_RH_67 1
137-#define AFTER_RH_6x 1
138-#define AFTER_RH_70 1
139-#define BEFORE_RH_72 1
140-#endif
141-#ifdef KERNELVERSION_3_10_0_327
9752ce8d
JR
142-#define AFTER_RH_62 1
143-#define AFTER_RH_63 1
144-#define AFTER_RH_64 1
145-#define AFTER_RH_65 1
146-#define AFTER_RH_66 1
147-#define AFTER_RH_67 1
148-#define AFTER_RH_6x 1
149-#define AFTER_RH_70 1
150-#define AFTER_RH_71 1
151-#endif
152-#ifdef KERNELVERSION_3_10_0_514
fda6bd2d
JR
153-#define AFTER_RH_62 1
154-#define AFTER_RH_63 1
155-#define AFTER_RH_64 1
156-#define AFTER_RH_65 1
157-#define AFTER_RH_66 1
158-#define AFTER_RH_67 1
159-#define AFTER_RH_6x 1
160-#define AFTER_RH_70 1
161-#define AFTER_RH_71 1
162-#define AFTER_RH_72 1
163-#endif
164-#ifdef KERNELVERSION_3_10_0_693
6986ddb6
JR
165 #define AFTER_RH_62 1
166 #define AFTER_RH_63 1
167 #define AFTER_RH_64 1
300a759d 168@@ -126,7 +35,6 @@
300a759d 169 #define AFTER_RH_71 1
9752ce8d 170 #define AFTER_RH_72 1
fda6bd2d 171 #define AFTER_RH_73 1
6986ddb6
JR
172-#endif
173
174 /* Misc defines needed so source is same for all versions of Linux */
175 #ifndef SDEV_TRANSPORT_OFFLINE
dc1a7dc8
JR
176--- lin_tape-3.0.52/lin_tape_scsi_config.h~ 2020-04-04 21:53:09.000000000 +0200
177+++ lin_tape-3.0.52/lin_tape_scsi_config.h 2020-04-04 21:56:46.600032193 +0200
178@@ -64,9 +64,6 @@
179 ("IBM Tape Drives and Libraries");
180 MODULE_LICENSE("GPL");
181 MODULE_VERSION("3.0.52");
182-#if defined(SLESVERSION)
183-MODULE_INFO(supported, "external");
184-#endif // defined
185 /* driver parameters */
186 int support_dio = 1;
187 module_param(support_dio, int, 0);
188--- lin_tape-3.0.52/sgmp.c~ 2020-03-05 19:43:09.000000000 +0100
189+++ lin_tape-3.0.52/sgmp.c 2020-04-04 21:57:56.793366544 +0200
190@@ -34,7 +34,7 @@
191 */
192
193 #include <linux/version.h>
194-#if !defined(SLESVERSION) && LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
195+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
196 /*
197 * History:
198 * Started: Aug 9 by Lawrence Foard (entropy@world.std.com),
199@@ -3012,7 +3012,7 @@
200 return 0;
201 }
202 #endif /* CONFIG_SCSI_PROC_FS */
203-#elif !defined(SLESVERSION) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
204+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
205 static int sg_version_num = 30536; /* 2 digits for each component */
206 #define SG_VERSION_STR "3.5.36"
207
208@@ -6026,7 +6026,7 @@
209 }
210
211 #endif /* CONFIG_SCSI_PROC_FS */
212-#elif !defined(SLESVERSION) && LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32)
213+#elif LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32)
214 static int sg_version_num = 30534; /* 2 digits for each component */
215 #define SG_VERSION_STR "3.5.34"
216
217--- lin_tape-3.0.52/stmp.c~ 2020-03-05 19:43:09.000000000 +0100
218+++ lin_tape-3.0.52/stmp.c 2020-04-04 21:58:35.473367112 +0200
219@@ -42,7 +42,7 @@
220
221 */
222 #include <linux/version.h>
223-#if !defined(SLESVERSION) && LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
224+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,14,0)
225 /*
226 SCSI Tape Driver for Linux version 1.1 and newer. See the accompanying
227 file Documentation/scsi/st.txt for more information.
228@@ -5108,7 +5108,7 @@
229
230 return 0;
231 }
232-#elif !defined(SLESVERSION) && LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
233+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(3,10,0)
234 #include <linux/module.h>
235 #include <linux/fs.h>
236 #include <linux/kernel.h>
237@@ -10137,7 +10137,7 @@
238
239 return 0;
240 }
241-#elif !defined(SLESVERSION) && LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32)
242+#elif LINUX_VERSION_CODE == KERNEL_VERSION(2,6,32)
243 #include <linux/module.h>
244 #include <linux/fs.h>
245 #include <linux/kernel.h>
246--- lin_tape-3.0.52/upper.c~ 2020-04-04 21:55:46.000000000 +0200
247+++ lin_tape-3.0.52/upper.c 2020-04-04 21:59:12.536700966 +0200
248@@ -273,7 +273,7 @@
249 if (copy_from_user(pfo_cmd->scsi_cmd, hdr->cmdp, hdr->cmd_len))
250 return -EFAULT;
251
252-#if LINUX_VERSION_CODE > KERNEL_VERSION(3,12,0) && (defined(SLESVERSION) || defined(UBUNTUVERSION))
253+#if LINUX_VERSION_CODE > KERNEL_VERSION(3,12,0)
254 if (blk_verify_command(pfo_cmd->scsi_cmd, mode & FMODE_WRITE))
255 #else
256 /* RHEL 6.4 and beyond */
257@@ -525,14 +525,12 @@
258 /* SG_IO howto says that the shorter of the two wins */
259 iov_data_len = iov_length((struct iovec *)iov,
260 hdr->iovec_count);
261-#if !defined (UBUNTUVERSION)
262 if (hdr->dxfer_len < iov_data_len) {
263 hdr->iovec_count = iov_shorten((struct iovec *)iov,
264 hdr->iovec_count,
265 hdr->dxfer_len);
266 iov_data_len = hdr->dxfer_len;
267 }
268-#endif
269 pfo_cmd.buffer = iov;
270 pfo_cmd.bufflen = iov_data_len;
271 pfo_cmd.iov_count = hdr->iovec_count;
272@@ -622,7 +620,7 @@
273 if (in_len && copy_from_user(buffer, sic->data + cmdlen, in_len))
274 goto error;
275
276-#if LINUX_VERSION_CODE > KERNEL_VERSION(3,12,0) && (defined(SLESVERSION) || defined(UBUNTUVERSION))
277+#if LINUX_VERSION_CODE > KERNEL_VERSION(3,12,0)
278 err = blk_verify_command(scsi_cmd, mode & FMODE_WRITE);
279 #else
280 /* RHEL 6.4 and beyond */
281--- lin_tape-3.0.52/intercept.c~ 2020-03-05 19:43:09.000000000 +0100
282+++ lin_tape-3.0.52/intercept.c 2020-04-04 21:59:43.190034776 +0200
283@@ -2492,9 +2492,6 @@
284 MODULE_LICENSE("GPL");
285 MODULE_VERSION(PFO_VERSION_STR);
286 MODULE_INFO(date, PFO_DATE_STR);
287-#if defined(SLESVERSION)
288-MODULE_INFO(supported, "external");
289-#endif
290 #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,32)
291 module_param(netbackup, int, 0444);
292 MODULE_PARM_DESC(netbackup, "!=0 to use with NetBackup application");
This page took 0.104024 seconds and 4 git commands to generate.