The default mode for Rpmsgdev is to read/write data as long as possible for
caller, this mode does not apply to tun devices, tun devices can read and
write only one complete ip packet at a time.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
1. rpmsgdev ioctl: should assgin back the client return value to
cookie->result, then this return value can be returned to the
application;
2. rpmsgdev seek: the type "off_t" may be 64bit, so modify the offset
in "struct rpmsgdev_lseek" to int64_t too;
3. rpmsgdev_seek: the rpmsgdev_seek in client should update the
filep->f_pos after the seek operation;
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
Before this commit, each rpmsgdev server only manages one file
no matter how many times the client opened.
It can't work fine with some complex drivers, such as input driver
(keyboard, touchscreen and button), because input driver will alloc
a new private open structure for every open operation to make sure
all the applications don't miss data when input driver is used by
multiple applications.
This commit solves this problem by making the files in server and
client be one-to-one.
Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>