netlink patch

Viljar Tulit (viljar@it.ioc.ee)
Mon, 24 Nov 1997 12:35:24 +0200 (EET)


to get netlink work, patch for 2.1.65.

Viljar.

--- netlink.c.ori Mon Nov 24 12:21:54 1997
+++ netlink.c Mon Nov 24 12:27:12 1997
@@ -81,11 +81,11 @@
* Write a message to the kernel side of a communication link
*/

-static long netlink_write(struct inode * inode, struct file * file,
- const char * buf, unsigned long count)
+static ssize_t netlink_write(struct file * file, const char * buf,
+ size_t count,loff_t *ppos)
{
int err;
- unsigned int minor = MINOR(inode->i_rdev);
+ unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev);
struct sk_buff *skb;
skb=alloc_skb(count, GFP_KERNEL);
err = copy_from_user(skb_put(skb,count),buf, count);
@@ -96,11 +96,11 @@
* Read a message from the kernel side of the communication link
*/

-static long netlink_read(struct inode * inode, struct file * file, char * buf,
- unsigned long count)
+static ssize_t netlink_read(struct file * file, char * buf,
+ size_t count,loff_t *ppos)
{
int err;
- unsigned int minor = MINOR(inode->i_rdev);
+ unsigned int minor = MINOR(file->f_dentry->d_inode->i_rdev);
struct sk_buff *skb;
cli();
while((skb=skb_dequeue(&skb_queue_rd[minor]))==NULL)