Package: mol-source
Version: 0.9.71.dfsg-4
Severity: normal
Tags: patch

Please find attatched patch which enables the build of the sheep
driver. Tested only on 2.6.19-rc6.

Elimar



-- 
  Excellent day for drinking heavily. 
  Spike the office water cooler;-)
Elimar Riesebieter <[EMAIL PROTECTED]> writes:

> /usr/src/modules/mol/netdriver/sheep.c:630: error: unknown field
> 'readv' specified in initializer
> /usr/src/modules/mol/netdriver/sheep.c:630: warning: initialization
> from incompatible pointer type
> /usr/src/modules/mol/netdriver/sheep.c:631: error: unknown field
> 'writev' specified in initializer
> /usr/src/modules/mol/netdriver/sheep.c:631: warning: initialization
> from incompatible pointer type

--- src/netdriver/sheep.c       2006-10-05 20:28:12.000000000 +0200
+++ src/netdriver/sheep.c       2006-10-05 21:27:08.000000000 +0200
@@ -368,8 +368,9 @@ memcpy_fromv( char *buf, const struct io
 }
 
 static ssize_t 
-sheep_net_readv( struct file *f, const struct iovec *iv, unsigned long count, 
loff_t *pos )
+sheep_net_aio_read(struct kiocb *iocb, const struct iovec *iv, unsigned long 
count, loff_t pos)
 {
+       struct file *f = iocb->ki_filp;
        struct SheepVars *v = (struct SheepVars *)f->private_data;
        struct sk_buff *skb;
        int size = get_iovsize( iv, count );
@@ -398,8 +399,9 @@ sheep_net_readv( struct file *f, const s
 }
 
 static ssize_t 
-sheep_net_writev( struct file *f, const struct iovec *iv, unsigned long count, 
loff_t *off )
+sheep_net_aio_write(struct kiocb *iocb, const struct iovec *iv, unsigned long 
count, loff_t off)
 {
+       struct file *f = iocb->ki_filp;
        struct SheepVars *v = (struct SheepVars *)f->private_data;
        struct sk_buff *skb;
        int size = get_iovsize( iv, count );
@@ -471,24 +473,6 @@ sheep_net_writev( struct file *f, const 
        return size;
 }
 
-static ssize_t
-sheep_net_read( struct file *f, char *buf, size_t count, loff_t *off )
-{
-       struct iovec iv;
-       iv.iov_base = buf;
-       iv.iov_len = count;
-       return sheep_net_readv( f, &iv, 1, off );
-}
-
-static ssize_t 
-sheep_net_write( struct file *f, const char *buf, size_t count, loff_t *off )
-{
-       struct iovec iv;
-       iv.iov_len = count;
-       iv.iov_base = (char *)buf;
-       return sheep_net_writev( f, &iv, 1, off );
-}
-
 static unsigned int
 sheep_net_poll( struct file *f, struct poll_table_struct *wait )
 {
@@ -625,10 +609,10 @@ error:
 
 static struct file_operations sheep_net_fops = {
        .owner          = THIS_MODULE,
-       .read           = sheep_net_read,
-       .write          = sheep_net_write,
-       .readv          = sheep_net_readv,
-       .writev         = sheep_net_writev,
+       .read           = do_sync_read,
+       .aio_read       = sheep_net_aio_read,
+       .write          = do_sync_write,
+       .aio_write      = sheep_net_aio_write,
        .poll           = sheep_net_poll,
        .ioctl          = sheep_net_ioctl,
        .open           = sheep_net_open,

Andreas.

-- 
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."
_______________________________________________
mol-general mailing list
[EMAIL PROTECTED]
http://lists.terrasoftsolutions.com/mailman/listinfo/mol-general

Reply via email to