| Index: remoting/host/setup/start_host_main.cc
|
| diff --git a/remoting/host/setup/start_host_main.cc b/remoting/host/setup/start_host_main.cc
|
| index 4c0d14b5322c60359dedcf5e22ea80d2d766152b..df74f6d149654b38d3b9e7f81214c47035de19c5 100644
|
| --- a/remoting/host/setup/start_host_main.cc
|
| +++ b/remoting/host/setup/start_host_main.cc
|
| @@ -157,16 +157,21 @@ int StartHostMain(int argc, char** argv) {
|
| }
|
| #endif // defined(OS_WIN)
|
|
|
| - if (host_name.empty()) {
|
| + if (command_line->HasSwitch("help") || command_line->HasSwitch("h") ||
|
| + command_line->HasSwitch("?") || !command_line->GetArgs().empty()) {
|
| fprintf(stderr,
|
| - "Usage: %s --name=<hostname> [--code=<auth-code>] [--pin=<PIN>] "
|
| + "Usage: %s [--name=<hostname>] [--code=<auth-code>] [--pin=<PIN>] "
|
| "[--redirect-url=<redirectURL>]\n",
|
| argv[0]);
|
| - fprintf(stderr, "\nAuthorization URL for Production services:\n");
|
| - fprintf(stderr, "%s\n", GetAuthorizationCodeUri().c_str());
|
| return 1;
|
| }
|
|
|
| + if (host_name.empty()) {
|
| + fprintf(stdout, "Enter a name for this computer: ");
|
| + fflush(stdout);
|
| + host_name = ReadString(false);
|
| + }
|
| +
|
| if (host_pin.empty()) {
|
| while (true) {
|
| fprintf(stdout, "Enter a PIN of at least six digits: ");
|
| @@ -197,6 +202,8 @@ int StartHostMain(int argc, char** argv) {
|
| }
|
|
|
| if (auth_code.empty()) {
|
| + fprintf(stdout, "\nAuthorization URL for Production services:\n");
|
| + fprintf(stdout, "%s\n\n", GetAuthorizationCodeUri().c_str());
|
| fprintf(stdout, "Enter an authorization code: ");
|
| fflush(stdout);
|
| auth_code = ReadString(true);
|
|
|