Patchwork [maybe-for-2.0,2/2] vl.c: Improve message when no default machine is found

login
register
mail settings
Submitter Peter Maydell
Date March 25, 2014, 7:26 p.m.
Message ID <1395775613-30984-3-git-send-email-peter.maydell@linaro.org>
Download mbox | patch
Permalink /patch/333688/
State New
Headers show

Comments

Peter Maydell - March 25, 2014, 7:26 p.m.
Improve the clarity of the message QEMU prints when the user
doesn't specify a machine model to use and there is no default.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
 vl.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
Marcel Apfelbaum - March 26, 2014, 7:22 p.m.
On Tue, 2014-03-25 at 19:26 +0000, Peter Maydell wrote:
> Improve the clarity of the message QEMU prints when the user
> doesn't specify a machine model to use and there is no default.
> 
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  vl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/vl.c b/vl.c
> index 2355227..9975e5a 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3929,7 +3929,8 @@ int main(int argc, char **argv, char **envp)
>  #endif
>  
>      if (machine_class == NULL) {
> -        fprintf(stderr, "No machine found.\n");
> +        fprintf(stderr, "No machine specified, and there is no default.\n"
> +                "Use -machine help to list supported machines!\n");
+1

Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com>

>          exit(1);
>      }
>
alex.bennee@linaro.org - March 28, 2014, 11:16 a.m.
Peter Maydell <peter.maydell@linaro.org> writes:

> Improve the clarity of the message QEMU prints when the user
> doesn't specify a machine model to use and there is no default.
>
> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
> ---
>  vl.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/vl.c b/vl.c
> index 2355227..9975e5a 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -3929,7 +3929,8 @@ int main(int argc, char **argv, char **envp)
>  #endif
>  
>      if (machine_class == NULL) {
> -        fprintf(stderr, "No machine found.\n");
> +        fprintf(stderr, "No machine specified, and there is no default.\n"
> +                "Use -machine help to list supported machines!\n");
>          exit(1);
>      }

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

Patch

diff --git a/vl.c b/vl.c
index 2355227..9975e5a 100644
--- a/vl.c
+++ b/vl.c
@@ -3929,7 +3929,8 @@  int main(int argc, char **argv, char **envp)
 #endif
 
     if (machine_class == NULL) {
-        fprintf(stderr, "No machine found.\n");
+        fprintf(stderr, "No machine specified, and there is no default.\n"
+                "Use -machine help to list supported machines!\n");
         exit(1);
     }