[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 4/4] linux-user: Treat --foo options the same as -fo
From: |
Meador Inge |
Subject: |
[Qemu-devel] [PATCH 4/4] linux-user: Treat --foo options the same as -foo |
Date: |
Tue, 27 Mar 2012 17:44:31 -0500 |
The system mode binaries provide a similiar alias
and it makes common options like --version and --help
work as expected.
Signed-off-by: Meador Inge <address@hidden>
---
linux-user/main.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index 9616d8e..8f6ca0d 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3240,6 +3240,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)) {
--
1.7.7.6