Skip to content

Commit

Permalink
Revert "convert insize to host byte order before use in calculating d…
Browse files Browse the repository at this point in the history
…ata size"

This reverts commit 222a60a.
  • Loading branch information
fandango96 committed Jun 11, 2024
1 parent 222a60a commit ddd2a1c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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)

#
Expand Down
6 changes: 4 additions & 2 deletions src/ioctl_tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#include <stdint.h>
#include <assert.h>
#include <errno.h>
#include <glib.h>
#include <linux/ioctl.h>
#include <linux/usbdevice_fs.h>
#include <linux/input.h>
Expand All @@ -33,6 +32,9 @@
#include "cros_ec.h"
#include "ioctl_tree.h"

#define TRUE 1
#define FALSE 0

#define UNUSED __attribute__ ((unused))


Expand Down Expand Up @@ -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[] = {
Expand Down

0 comments on commit ddd2a1c

Please sign in to comment.