- build fix for kernel 4.19 auto/th/lin_tape-3.0.33-1
authorJan Rękorajski <baggins@pld-linux.org>
Sat, 27 Oct 2018 12:21:53 +0000 (14:21 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sat, 27 Oct 2018 12:21:53 +0000 (14:21 +0200)
kernel-4.19.patch [new file with mode: 0644]

diff --git a/kernel-4.19.patch b/kernel-4.19.patch
new file mode 100644 (file)
index 0000000..4a06007
--- /dev/null
@@ -0,0 +1,29 @@
+--- lin_tape-3.0.33/lower.c.orig       2018-10-27 12:12:06.000000000 +0200
++++ lin_tape-3.0.33/lower.c    2018-10-27 14:11:03.207396481 +0200
+@@ -276,8 +276,13 @@
+                       pfo_cmd->bufflen, local_raw_sense, pfo_cmd->timeout,
+                       pfo_cmd->retries, pfo_cmd->flags, &pfo_cmd->resid_len);
+ #else
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0)
+                       pfo_cmd->bufflen, local_raw_sense, &local_sense_data, pfo_cmd->timeout,
+                       pfo_cmd->retries, pfo_cmd->flags, 0, &pfo_cmd->resid_len);
++#else
++                      pfo_cmd->bufflen, NULL, &local_sense_data, pfo_cmd->timeout,
++                      pfo_cmd->retries, pfo_cmd->flags, 0, &pfo_cmd->resid_len);
++#endif
+ #endif
+       } else {
+               /* SCSI Command from user space */
+@@ -291,8 +296,12 @@
+       scsi_device_put(sdev);
+       unlock_apfo_path(path_num);
++#if LINUX_VERSION_CODE < KERNEL_VERSION(4,19,0)
+       valid_sense = scsi_normalize_sense(local_raw_sense,
+                               SCSI_SENSE_BUFFERSIZE, &local_sense_data);
++#else
++      valid_sense = scsi_sense_valid(&local_sense_data);
++#endif
+       /* Put the SCSI command results in the structure */
+       pfo_cmd->errors = result;
+       pfo_cmd->scsi_status_code = result & 0xff;
This page took 0.500179 seconds and 4 git commands to generate.