From ddd2a1c1d4ed455704d3a8b9c3c8f7e3493c142b Mon Sep 17 00:00:00 2001 From: Abhinav Baid Date: Tue, 11 Jun 2024 21:02:29 +0100 Subject: [PATCH] Revert "convert insize to host byte order before use in calculating data size" This reverts commit 222a60a2a20732d1240119ce3c55644b6a86267b. --- meson.build | 2 +- src/ioctl_tree.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/meson.build b/meson.build index f8e6543..1ef90d8 100644 --- a/meson.build +++ b/meson.build @@ -135,7 +135,7 @@ preload_lib = shared_library('umockdev-preload', 'src/ioctl_tree.c'], c_args: ['-fvisibility=default'], version: '0.0.0', - dependencies: [dl, glib, pthread], + dependencies: [dl, pthread], install: true) # diff --git a/src/ioctl_tree.c b/src/ioctl_tree.c index 320c20d..8f99341 100644 --- a/src/ioctl_tree.c +++ b/src/ioctl_tree.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -33,6 +32,9 @@ #include "cros_ec.h" #include "ioctl_tree.h" +#define TRUE 1 +#define FALSE 0 + #define UNUSED __attribute__ ((unused)) @@ -908,7 +910,7 @@ cros_ec_ioctl_get_data_size(IOCTL_REQUEST_TYPE _id, const void *data) { const struct cros_ec_command_v2 *s_cmd = (struct cros_ec_command_v2 *)data; - return sizeof(struct cros_ec_command_v2) + GUINT32_FROM_LE(s_cmd->insize); + return sizeof(struct cros_ec_command_v2) + s_cmd->insize; } ioctl_type ioctl_db[] = {