summaryrefslogtreecommitdiff
path: root/cli/cli_main.cpp
diff options
context:
space:
mode:
authorJose Fonseca <jfonseca@vmware.com>2017-04-11 13:51:04 +0100
committerJose Fonseca <jfonseca@vmware.com>2017-04-11 13:53:47 +0100
commitf99bf0db20e0bffa6a69ee0f47f131fbddbcadaf (patch)
tree6b943f83397d22ef34adbca4d028304075320fd6 /cli/cli_main.cpp
parent038054be03e376671ae8a4b888dc98fdbfa3091d (diff)
cli: Remove trim-auto.
Per https://lists.freedesktop.org/archives/apitrace/2017-April/001215.html Actually the GUI was incorrectly using trim-auto. This was a mistake from my d9809aa93ce4bdeb57f1ab81decea4b54cf20026 commit.
Diffstat (limited to 'cli/cli_main.cpp')
-rw-r--r--cli/cli_main.cpp18
1 files changed, 12 insertions, 6 deletions
diff --git a/cli/cli_main.cpp b/cli/cli_main.cpp
index b475bd3b..6f95d6ac 100644
--- a/cli/cli_main.cpp
+++ b/cli/cli_main.cpp
@@ -78,7 +78,6 @@ static const Command * commands[] = {
&retrace_command,
&trace_command,
&trim_command,
- &trim_auto_command,
&help_command
};
@@ -155,7 +154,7 @@ do_help_command(int argc, char *argv[])
}
}
- std::cerr << "Error: Unknown command: " << command_name
+ std::cerr << "error: Unknown command: " << command_name
<< " (see \"apitrace help\").\n";
return 1;
@@ -179,7 +178,7 @@ main(int argc, char **argv)
if (strcmp(arg, "--help") == 0) {
return do_help_command(0, NULL);
} else {
- std::cerr << "Error: unknown option " << arg << "\n";
+ std::cerr << "error: unknown option " << arg << "\n";
usage();
return 1;
}
@@ -198,18 +197,25 @@ main(int argc, char **argv)
for (i = 0; i < ARRAY_SIZE(commands); i++) {
command = commands[i];
- if (strcmp(command_name, command->name) == 0)
+ if (strcmp(command_name, command->name) == 0) {
return (command->function) (argc, argv);
+ }
}
for (i = 0; i < ARRAY_SIZE(aliases); i++) {
alias = &aliases[i];
- if (strcmp(command_name, alias->name) == 0)
+ if (strcmp(command_name, alias->name) == 0) {
return (alias->command->function) (argc, argv);
+ }
+ }
+
+ if (strcmp(command_name, "trim-auto") == 0) {
+ std::cerr << "error: trim-auto command is no longer supported -- https://goo.gl/Kl6nTU\n";
+ return 1;
}
- std::cerr << "Error: unknown command " << command_name
+ std::cerr << "error: unknown command " << command_name
<< " (see \"apitrace help\").\n";
return 1;