From ba02577cadbe5b53db791522310c977f9960f81f Mon Sep 17 00:00:00 2001 From: Meador Inge Date: Mon, 6 Jul 2015 11:03:41 -0700 Subject: linux-user: Treat --foo options the same as -foo The system mode binaries provide a similar alias and it makes common options like --version and --help work as expected. Signed-off-by: Meador Inge Signed-off-by: Riku Voipio --- linux-user/main.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'linux-user/main.c') diff --git a/linux-user/main.c b/linux-user/main.c index c7c39d4d5c..6599a41404 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -4024,6 +4024,10 @@ static int parse_args(int argc, char **argv) if (!strcmp(r, "-")) { break; } + /* Treat --foo the same as -foo. */ + if (r[0] == '-') { + r++; + } for (arginfo = arg_table; arginfo->handle_opt != NULL; arginfo++) { if (!strcmp(r, arginfo->argv)) { -- cgit v1.2.3