Skip to content

Commit

Permalink
linux-user: Add support for TYPE_LONG and TYPE_ULONG in do_ioctl()
Browse files Browse the repository at this point in the history
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>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <1579117007-7565-14-git-send-email-Filip.Bozuta@rt-rk.com>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
  • Loading branch information
Filip Bozuta authored and vivier committed Jan 22, 2020
1 parent f7dbd8f commit c858e53
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions linux-user/syscall.c
Expand Up @@ -5178,6 +5178,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:
Expand Down

0 comments on commit c858e53

Please sign in to comment.