From dd05dc76a45718ad327d3fec69c259b873c39154 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Tue, 5 Aug 2014 18:18:17 +0200 Subject: hwstub: don't put revision in the protocol, it's specific to the implementation Change-Id: I1311a22da41fe977f1613f1e313a864baa03027c --- utils/hwstub/hwstub_protocol.h | 5 ----- utils/hwstub/stub/protocol.h | 2 ++ utils/hwstub/tools/hwstub_shell.cpp | 10 ++++------ utils/hwstub/tools/init.lua | 4 ++-- 4 files changed, 8 insertions(+), 13 deletions(-) (limited to 'utils/hwstub') diff --git a/utils/hwstub/hwstub_protocol.h b/utils/hwstub/hwstub_protocol.h index 759aa51b55..23bc19ceee 100644 --- a/utils/hwstub/hwstub_protocol.h +++ b/utils/hwstub/hwstub_protocol.h @@ -27,11 +27,6 @@ #define HWSTUB_VERSION_MAJOR 4 #define HWSTUB_VERSION_MINOR 0 -#define HWSTUB_VERSION_REV 0 - -#define HWSTUB_VERSION__(maj,min,rev) #maj"."#min"."#rev -#define HWSTUB_VERSION_(maj,min,rev) HWSTUB_VERSION__(maj,min,rev) -#define HWSTUB_VERSION HWSTUB_VERSION_(HWSTUB_VERSION_MAJOR,HWSTUB_VERSION_MINOR,HWSTUB_VERSION_REV) /** * A device can use any VID:PID but in case hwstub is in full control of the diff --git a/utils/hwstub/stub/protocol.h b/utils/hwstub/stub/protocol.h index 35510fa9b2..e358bb0a36 100644 --- a/utils/hwstub/stub/protocol.h +++ b/utils/hwstub/stub/protocol.h @@ -1 +1,3 @@ #include "../hwstub_protocol.h" + +#define HWSTUB_VERSION_REV 1 \ No newline at end of file diff --git a/utils/hwstub/tools/hwstub_shell.cpp b/utils/hwstub/tools/hwstub_shell.cpp index a10a1dad4e..2f2803da13 100644 --- a/utils/hwstub/tools/hwstub_shell.cpp +++ b/utils/hwstub/tools/hwstub_shell.cpp @@ -231,7 +231,7 @@ int my_lua_udelay(lua_State *state) bool my_lua_import_hwstub() { int oldtop = lua_gettop(g_lua); - + lua_newtable(g_lua); // hwstub lua_newtable(g_lua); // options @@ -336,8 +336,6 @@ bool my_lua_import_hwstub() lua_setfield(g_lua, -2, "major"); lua_pushinteger(g_lua, HWSTUB_VERSION_MINOR); lua_setfield(g_lua, -2, "minor"); - lua_pushinteger(g_lua, HWSTUB_VERSION_REV); - lua_setfield(g_lua, -2, "revision"); lua_setfield(g_lua, -2, "version"); lua_setfield(g_lua, -2, "host"); @@ -677,8 +675,8 @@ bool my_lua_import_soc(const std::vector< soc_t >& socs) void usage(void) { - printf("hwstub_tool, compiled with hwstub %d.%d.%d\n", - HWSTUB_VERSION_MAJOR, HWSTUB_VERSION_MINOR, HWSTUB_VERSION_REV); + printf("hwstub_tool, compiled with hwstub protocol %d.%d\n", + HWSTUB_VERSION_MAJOR, HWSTUB_VERSION_MINOR); printf("\n"); printf("usage: hwstub_tool [options] \n"); printf("options:\n"); @@ -797,7 +795,7 @@ int main(int argc, char **argv) { printf("Warning: this tool is possibly incompatible with your device:\n"); printf("Device version: %d.%d.%d\n", g_hwdev_ver.bMajor, g_hwdev_ver.bMinor, g_hwdev_ver.bRevision); - printf("Host version: %d.%d.%d\n", HWSTUB_VERSION_MAJOR, HWSTUB_VERSION_MINOR, HWSTUB_VERSION_REV); + printf("Host version: %d.%d\n", HWSTUB_VERSION_MAJOR, HWSTUB_VERSION_MINOR); } // get memory layout information diff --git a/utils/hwstub/tools/init.lua b/utils/hwstub/tools/init.lua index 3c60abf806..1fe0e0d734 100644 --- a/utils/hwstub/tools/init.lua +++ b/utils/hwstub/tools/init.lua @@ -66,8 +66,8 @@ end if not hwstub.options.quiet then print("information") print(" hwstub") - print(" version: " .. string.format("%d.%d.%d", hwstub.host.version.major, - hwstub.host.version.minor, hwstub.host.version.revision)) + print(" version: " .. string.format("%d.%d", hwstub.host.version.major, + hwstub.host.version.minor)) print(" device") print(" version: " .. string.format("%d.%d.%d", hwstub.dev.version.major, hwstub.dev.version.minor, hwstub.dev.version.revision)) -- cgit v1.2.3