Message ID | 1579115523-4159-14-git-send-email-Filip.Bozuta@rt-rk.com |
---|---|
State | New |
Headers | show |
Series | linux-user: Add support for real time clock and | expand |
Le 15/01/2020 à 20:12, Filip Bozuta a écrit : > Function "do_ioctl()" located in file "syscall.c" was missing > an option for TYPE_LONG and TYPE_ULONG. This caused some ioctls > to not be recognised because they had the third argument that was > of type 'long' or 'unsigned long'. > > For example: > > Since implemented ioctls RTC_IRQP_SET and RTC_EPOCH_SET > are of type IOW(writing type) that have unsigned long as > their third argument, they were not recognised in QEMU > before the changes of this patch. > > Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> > --- > linux-user/syscall.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/syscall.c > index a3993a2..2ba2c5c 100644 > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -5176,6 +5176,8 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) > break; > case TYPE_PTRVOID: > case TYPE_INT: > + case TYPE_LONG: > + case TYPE_ULONG: > ret = get_errno(safe_ioctl(fd, ie->host_cmd, arg)); > break; > case TYPE_PTR: > Reviewed-by: Laurent Vivier <laurent@vivier.eu>
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index a3993a2..2ba2c5c 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -5176,6 +5176,8 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg) break; case TYPE_PTRVOID: case TYPE_INT: + case TYPE_LONG: + case TYPE_ULONG: ret = get_errno(safe_ioctl(fd, ie->host_cmd, arg)); break; case TYPE_PTR:
Function "do_ioctl()" located in file "syscall.c" was missing an option for TYPE_LONG and TYPE_ULONG. This caused some ioctls to not be recognised because they had the third argument that was of type 'long' or 'unsigned long'. For example: Since implemented ioctls RTC_IRQP_SET and RTC_EPOCH_SET are of type IOW(writing type) that have unsigned long as their third argument, they were not recognised in QEMU before the changes of this patch. Signed-off-by: Filip Bozuta <Filip.Bozuta@rt-rk.com> --- linux-user/syscall.c | 2 ++ 1 file changed, 2 insertions(+)