summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorBrian Norris <briannorris@chromium.org>2016-05-24 13:05:52 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-05-24 19:23:30 -0700
commit840d61282cfae5bbc1fa8625e0264c112a3e3bb7 (patch)
treeeed0b70beb2205e2f48224dcbe57fe73480e8e4a /util
parent879231cbcebd562ed2b49112883a1dfe4cdc1778 (diff)
downloadchrome-ec-840d61282cfae5bbc1fa8625e0264c112a3e3bb7.tar.gz
ectool: use v2 ABI for fallback 'readmem' ioctl
ec_readmem_dev_v2() was copy/pasted from ec_readmem_dev(), but we forgot to switch over the fallback 'fake_it' case to the new ioctl format. This case is used over transports like SPI, which don't implement cmd_readmem. BUG=none TEST=run `ectool version` on kevin (with cros-ec-spi) and don't see: ioctl -1, errno 25 (Inappropriate ioctl for device), EC result 255 (<unknown>) BRANCH=none Change-Id: I4335f8fc3d43169cf628e26cadf1ac8d263955f2 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/347111 Reviewed-by: Guenter Roeck <groeck@chromium.org> Reviewed-by: Stephen Barber <smbarber@chromium.org>
Diffstat (limited to 'util')
-rw-r--r--util/comm-dev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/comm-dev.c b/util/comm-dev.c
index 94a5cdde52..96356a6177 100644
--- a/util/comm-dev.c
+++ b/util/comm-dev.c
@@ -187,9 +187,9 @@ static int ec_readmem_dev_v2(int offset, int bytes, void *dest)
r_mem.offset = offset;
r_mem.size = bytes;
- return ec_command_dev(EC_CMD_READ_MEMMAP, 0,
- &r_mem, sizeof(r_mem),
- dest, bytes);
+ return ec_command_dev_v2(EC_CMD_READ_MEMMAP, 0,
+ &r_mem, sizeof(r_mem),
+ dest, bytes);
}
/*