Re: Build with 2.6.19-rc3 fails
Andreas Schwab <[email protected]> Fri, 27 Oct 2006 21:28:32 +0200
| Newsgroups | gmane.linux.ports.ppc.mol.general |
|---|---|
| Message-ID | <[email protected]> |
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 cou= nt, loff_t *pos ) +sheep_net_aio_read(struct kiocb *iocb, const struct iovec *iv, unsigned lo= ng count, loff_t pos) { + struct file *f =3D iocb->ki_filp; struct SheepVars *v =3D (struct SheepVars *)f->private_data; struct sk_buff *skb; int size =3D 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 co= unt, loff_t *off ) +sheep_net_aio_write(struct kiocb *iocb, const struct iovec *iv, unsigned l= ong count, loff_t off) { + struct file *f =3D iocb->ki_filp; struct SheepVars *v =3D (struct SheepVars *)f->private_data; struct sk_buff *skb; int size =3D 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 =3D buf; - iv.iov_len =3D 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 *of= f ) -{ - struct iovec iv; - iv.iov_len =3D count; - iv.iov_base =3D (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 =3D { .owner =3D THIS_MODULE, - .read =3D sheep_net_read, - .write =3D sheep_net_write, - .readv =3D sheep_net_readv, - .writev =3D sheep_net_writev, + .read =3D do_sync_read, + .aio_read =3D sheep_net_aio_read, + .write =3D do_sync_write, + .aio_write =3D sheep_net_aio_write, .poll =3D sheep_net_poll, .ioctl =3D sheep_net_ioctl, .open =3D sheep_net_open, Andreas. -- = Andreas Schwab, SuSE Labs, [email protected] SuSE Linux Products GmbH, Maxfeldstra=DFe 5, 90409 N=FCrnberg, Germany PGP key fingerprint =3D 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."