From c53f760dfe9f05169b1e798ce29e42a78b793307 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Duval?= Date: Sat, 4 Dec 2021 19:20:42 +0100 Subject: [PATCH] strace: add some constants ioctl from sys/ioctl.h Change-Id: I100f715f899435c6a9bce775d95da6f755ba55c6 Reviewed-on: https://review.haiku-os.org/c/haiku/+/4762 Tested-by: Commit checker robot Reviewed-by: waddlesplash --- src/bin/debug/strace/ioctl.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/bin/debug/strace/ioctl.cpp b/src/bin/debug/strace/ioctl.cpp index 2559fe3524..5f0824f6a3 100644 --- a/src/bin/debug/strace/ioctl.cpp +++ b/src/bin/debug/strace/ioctl.cpp @@ -7,6 +7,7 @@ */ +#include #include #include @@ -20,7 +21,7 @@ struct ioctl_info { - int index; + unsigned int index; const char *name; TypeHandler *handler; }; @@ -159,7 +160,13 @@ static const ioctl_info kIOCtls[] = { IOCTL_INFO_ENTRY(B_SCSI_SCAN), IOCTL_INFO_ENTRY(B_SCSI_DATA_MODE), - { -1, NULL, NULL } + // socket ioctls + IOCTL_INFO_ENTRY_TYPE(FIONBIO, int*), + IOCTL_INFO_ENTRY_TYPE(FIONREAD, int*), + IOCTL_INFO_ENTRY_TYPE(FIOSEEKDATA, off_t*), + IOCTL_INFO_ENTRY_TYPE(FIOSEEKHOLE, off_t*), + + { 0, NULL, NULL } }; static EnumTypeHandler::EnumMap kIoctlNames;