lkml.org 
[lkml]   [2009]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectaio_read const struct iovec *
Hello,
I have the following question:
struct file_operations {
ssize_t (*read) (struct file *, char __user *, size_t, loff_t *);
ssize_t (*write) (struct file *, const char __user *, size_t, loff_t *);
At the same time:
ssize_t (*aio_read) (struct kiocb *, const struct iovec *, unsigned long, loff_t);
ssize_t (*aio_write) (struct kiocb *, const struct iovec *, unsigned long, loff_t);

'const struct iovec *' both for aio_write and aio_read.
And "char __user *" and "const char __user *" for read/write.

For example,
pipe_read(struct kiocb *iocb, const struct iovec *_iov,
unsigned long nr_segs, loff_t ppos)
{
struct iovec *iov = (struct iovec *)_iov;

Could we avoid 'struct iovec *iov = (struct iovec *)_iov;' by changing aio_read 'const struct iovec *'
to 'struct iovec *'?


Sergey[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2009-09-09 13:17    [W:0.034 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site