summaryrefslogtreecommitdiff
path: root/util/misc_util.h
diff options
context:
space:
mode:
authorGuenter Roeck <groeck@chromium.org>2016-04-07 14:40:40 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-04-12 19:00:36 -0700
commit7ce63a09f9137bb6e5edd19e506ed98e9967884c (patch)
tree81a12f598f2ecb5983401c9be30e5dbf5cc44e3c /util/misc_util.h
parent66af587cbcbc5e3075cd003db6032dd54ac6e8a2 (diff)
downloadchrome-ec-7ce63a09f9137bb6e5edd19e506ed98e9967884c.tar.gz
ectool: Upgrade to improved ioctl format
Support both old and new ioctl formats at the same time. Auto-detect the ioctl format used by the kernel. BUG=chromium:481710 BRANCH=None TEST=Work on Samus with kernel 4.4 and 3.8/3.14/3.18 Change-Id: I31d7ce5b517b4b5af8e2b617e386c3cfd3276f20 Signed-off-by: Guenter Roeck <groeck@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/331830 Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'util/misc_util.h')
-rw-r--r--util/misc_util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/util/misc_util.h b/util/misc_util.h
index 401710f0e5..9fe86e63b2 100644
--- a/util/misc_util.h
+++ b/util/misc_util.h
@@ -8,6 +8,7 @@
/* Don't use a macro where an inline will do... */
static inline int MIN(int a, int b) { return a < b ? a : b; }
+static inline int MAX(int a, int b) { return a > b ? a : b; }
/**
* Write a buffer to the file.