1 --- lin_tape-3.0.52/lin_tape_scsi_config.h~ 2020-03-05 19:43:09.000000000 +0100
2 +++ lin_tape-3.0.52/lin_tape_scsi_config.h 2020-04-04 21:53:09.046695460 +0200
5 return single_open(file, tape_read_proc, NULL);
7 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
8 static struct file_operations tape_proc_ops = {
10 .open = tape_open_proc,
13 .release = single_release,
16 +static struct proc_ops tape_proc_ops = {
17 + .proc_open = tape_open_proc,
18 + .proc_read = seq_read,
19 + .proc_lseek = seq_lseek,
20 + .proc_release = single_release,
28 return single_open(file, changer_read_proc, NULL);
30 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
31 static struct file_operations changer_proc_ops = {
33 .open = changer_open_proc,
36 .release = single_release,
39 +static struct proc_ops changer_proc_ops = {
40 + .proc_open = changer_open_proc,
41 + .proc_read = seq_read,
42 + .proc_lseek = seq_lseek,
43 + .proc_release = single_release,
48 static int status_read_proc
51 return single_open(file, status_read_proc, NULL);
53 +#if LINUX_VERSION_CODE < KERNEL_VERSION(5,6,0)
54 static struct file_operations status_proc_ops = {
56 .open = status_open_proc,
59 .release = single_release,
62 +static struct proc_ops status_proc_ops = {
63 + .proc_open = status_open_proc,
64 + .proc_read = seq_read,
65 + .proc_lseek = seq_lseek,
66 + .proc_release = single_release,
71 int rdstatus_pc_initial
72 --- lin_tape-3.0.52/lin_tape_ioctl_tape.c~ 2020-03-05 19:43:09.000000000 +0100
73 +++ lin_tape-3.0.52/lin_tape_ioctl_tape.c 2020-04-04 22:13:44.016713929 +0200
75 #include "lin_tape_scsi_tape.h"
76 #include <linux/delay.h>
79 +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
80 +struct lin_tape_timeval {
81 + __kernel_long_t tv_sec;
82 + __kernel_suseconds_t tv_usec;
85 +#define lin_tape_timeval timeval
88 /*****************************************************************************
93 ssize_t tape_set_tod(struct tape_descriptor** drvp)
95 - struct timeval* tv = NULL;
96 + struct lin_tape_timeval* tv = NULL;
97 struct tod_control* buffer = NULL;
98 struct tape_descriptor *drv = *drvp;
99 int now = 0, rc = STATUS_SUCCESS;
100 @@ -2810,20 +2820,20 @@
104 - tv = kmalloc(sizeof(struct timeval), GFP_KERNEL);
105 + tv = kmalloc(sizeof(struct lin_tape_timeval), GFP_KERNEL);
111 memset(buffer, '\0', sizeof(struct tod_control));
112 - memset(tv, '\0', sizeof(struct timeval));
113 + memset(tv, '\0', sizeof(struct lin_tape_timeval));
115 rc = tape_modesense_page(&drv, TODControlPageNumber, (unchar*)buffer,
116 sizeof(struct tod_control), True, True);
117 if(rc != STATUS_SUCCESS) goto EXIT_LABEL;
119 - memset(tv, '\0', sizeof(struct timeval));
120 + memset(tv, '\0', sizeof(struct lin_tape_timeval));
121 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)
124 @@ -8930,7 +8940,7 @@
126 int erp_tod(struct tape_descriptor* drv, union cdb* tmp_cdb, char* sense_data)
128 - struct timeval* tv = NULL;
129 + struct lin_tape_timeval* tv = NULL;
130 struct tod_control* tod_buf = NULL;
131 int now = 0, rc = -EIO;
133 @@ -8940,7 +8950,7 @@
137 - tv = kmalloc(sizeof(struct timeval), GFP_KERNEL);
138 + tv = kmalloc(sizeof(struct lin_tape_timeval), GFP_KERNEL);
142 @@ -8951,7 +8961,7 @@
143 if(rc != STATUS_SUCCESS) goto EXIT_LABEL;
145 /* get time info to set TOD */
146 - memset(tv, '\0', sizeof(struct timeval));
147 + memset(tv, '\0', sizeof(struct lin_tape_timeval));
148 #if LINUX_VERSION_CODE < KERNEL_VERSION(5, 0, 0)