summarylogtreecommitdiffstats
path: root/0002-kernel-5.6-proc_dir_entry-proc_ops.patch
diff options
context:
space:
mode:
authorChris Severance2020-05-21 13:44:30 -0400
committerChris Severance2020-05-21 13:44:30 -0400
commit14aa017515cea3f1e1804e7a0e7dd355929e182c (patch)
tree716e6fb3afae8718b574c941472ec8b31ac8d7d4 /0002-kernel-5.6-proc_dir_entry-proc_ops.patch
parent52889ab4f4ff11967a3584c32634ed7be00271c6 (diff)
downloadaur-14aa017515cea3f1e1804e7a0e7dd355929e182c.tar.gz
autu: Update to 7.38-2
Diffstat (limited to '0002-kernel-5.6-proc_dir_entry-proc_ops.patch')
-rw-r--r--0002-kernel-5.6-proc_dir_entry-proc_ops.patch160
1 files changed, 160 insertions, 0 deletions
diff --git a/0002-kernel-5.6-proc_dir_entry-proc_ops.patch b/0002-kernel-5.6-proc_dir_entry-proc_ops.patch
new file mode 100644
index 000000000000..0ac56c97f979
--- /dev/null
+++ b/0002-kernel-5.6-proc_dir_entry-proc_ops.patch
@@ -0,0 +1,160 @@
+--- nslink.c.orig 2020-05-21 00:58:54.304970216 -0400
++++ nslink.c 2020-05-21 01:04:05.147271869 -0400
+@@ -5031,17 +5031,26 @@ static int queue_proc_show(struct seq_fi
+ }
+ static int queue_proc_open(struct inode *inode, struct file *file)
+ {
+ return single_open(file, queue_proc_show, NULL);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
++static const struct proc_ops queue_proc_fops = {
++ .proc_open = queue_proc_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = seq_release,
++};
++#else
+ static const struct file_operations queue_proc_fops = {
+ .open = queue_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+ };
+ #endif
++#endif
+
+
+ #if NSLINK_DEBUG_TRACE_HDLC
+
+ static char *stopString[] = {
+@@ -5089,17 +5098,26 @@ static int ack_proc_show(struct seq_file
+ }
+ static int ack_proc_open(struct inode *inode, struct file *file)
+ {
+ return single_open(file, ack_proc_show, NULL);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
++static const struct proc_ops ack_proc_fops = {
++ .proc_open = ack_proc_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = seq_release,
++};
++#else
+ static const struct file_operations ack_proc_fops = {
+ .open = ack_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+ };
+ #endif
++#endif
+
+ #define NumElements(a) (sizeof (a)/(sizeof (a)[0]))
+
+ // Implements the /proc/driver/nslink/port method.
+ static int port_proc_show(struct seq_file *m, void *v)
+@@ -5162,16 +5180,25 @@ static int port_proc_show(struct seq_fil
+ }
+ static int port_proc_open(struct inode *inode, struct file *file)
+ {
+ return single_open(file, port_proc_show, NULL);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
++static const struct proc_ops port_proc_fops = {
++ .proc_open = port_proc_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = seq_release,
++};
++#else
+ static const struct file_operations port_proc_fops = {
+ .open = port_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+ };
++#endif
+
+
+ // Implements the /proc/driver/nslink/hdlc method.
+ static int hdlc_proc_show(struct seq_file *m, void *v)
+ {
+@@ -5203,16 +5230,25 @@ static int hdlc_proc_show(struct seq_fil
+ }
+ static int hdlc_proc_open(struct inode *inode, struct file *file)
+ {
+ return single_open(file, hdlc_proc_show, NULL);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
++static const struct proc_ops hdlc_proc_fops = {
++ .proc_open = hdlc_proc_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = seq_release,
++};
++#else
+ static const struct file_operations hdlc_proc_fops = {
+ .open = hdlc_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+ };
++#endif
+
+
+ // Implements the /proc/driver/nslink/hdlc-queue method.
+ static int hdlc_queue_proc_show(struct seq_file *m, void *v)
+ {
+@@ -5258,16 +5294,25 @@ static int hdlc_queue_proc_show(struct s
+ }
+ static int hdlc_queue_proc_open(struct inode *inode, struct file *file)
+ {
+ return single_open(file, hdlc_queue_proc_show, NULL);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
++static const struct proc_ops hdlc_queue_proc_fops = {
++ .proc_open = hdlc_queue_proc_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = seq_release,
++};
++#else
+ static const struct file_operations hdlc_queue_proc_fops = {
+ .open = hdlc_queue_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+ };
++#endif
+
+
+ const char *inet_addr_string(struct sockaddr_storage *ss)
+ {
+ static char buf[256];
+@@ -5324,16 +5369,25 @@ static int status_proc_show(struct seq_f
+ }
+ static int status_proc_open(struct inode *inode, struct file *file)
+ {
+ return single_open(file, status_proc_show, NULL);
+ }
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5,6,0)
++static const struct proc_ops status_proc_fops = {
++ .proc_open = status_proc_open,
++ .proc_read = seq_read,
++ .proc_lseek = seq_lseek,
++ .proc_release = seq_release,
++};
++#else
+ static const struct file_operations status_proc_fops = {
+ .open = status_proc_open,
+ .read = seq_read,
+ .llseek = seq_lseek,
+ .release = seq_release,
+ };
++#endif
+
+ /********************************************************************************/
+ /* */
+ /* MODULE INIT/CLEANUP FUNCTIONS */
+ /* */