qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 34f405: vl.c: Fix regression in machine error


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 34f405: vl.c: Fix regression in machine error message
Date: Fri, 19 Feb 2016 08:30:05 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 34f405ae6d5c4170b192a12b2e654a2aea0c3b50
      
https://github.com/qemu/qemu/commit/34f405ae6d5c4170b192a12b2e654a2aea0c3b50
  Author: Marcel Apfelbaum <address@hidden>
  Date:   2016-02-19 (Fri, 19 Feb 2016)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl.c: Fix regression in machine error message

Commit e1ce0c3cb (vl.c: fix regression when reading machine type
from config file) fixed the error message when the machine type
was supplied inside the config file. However now the option name
is not displayed correctly if the error happens when the machine
is specified at command line.

Running
    ./x86_64-softmmu/qemu-system-x86_64 -M q35-1.5 -redir tcp:8022::22
will result in the error message:
    qemu-system-x86_64: -redir tcp:8022::22: unsupported machine type
    Use -machine help to list supported machines

Fixed it by restoring the error location and also extracted the code
dealing with machine options into a separate function.

Reported-by: Michael S. Tsirkin <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 43fa1e0bd98887fb5ead745de13dc9961799e97e
      
https://github.com/qemu/qemu/commit/43fa1e0bd98887fb5ead745de13dc9961799e97e
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-02-19 (Fri, 19 Feb 2016)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Reset location after handling command-line arguments

After looping through all command-line arguments, error location
info becomes obsolete, and any function calling error_report()
will print misleading information. This breaks error reporting
for some option handling, like:

  $ qemu-system-x86_64 -icount rr=x -vnc :0
  qemu-system-x86_64: -vnc :0: Invalid icount rr option: x

  $ qemu-system-x86_64 -m size= -vnc :0
  qemu-system-x86_64: -vnc :0: missing 'size' option value

Fix this by resetting location info as soon as we exit the
command-line handling loop.

With this, replay_configure() and set_memory_options() won't
print any location info yet, but at least they won't print
incorrect information.

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
["Do not insert code here" comment added to prevent regressions]
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 890ad5508e0e450272faa4b38611b9df5bab871a
      
https://github.com/qemu/qemu/commit/890ad5508e0e450272faa4b38611b9df5bab871a
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-02-19 (Fri, 19 Feb 2016)

  Changed paths:
    M replay/replay.c

  Log Message:
  -----------
  replay: Set error location properly when parsing options

Set error location so the error_report() calls will show
appropriate command-line argument or config file info.

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: bbe2d25c8f89db4f0075a1321b1911b42d97e436
      
https://github.com/qemu/qemu/commit/bbe2d25c8f89db4f0075a1321b1911b42d97e436
  Author: Eduardo Habkost <address@hidden>
  Date:   2016-02-19 (Fri, 19 Feb 2016)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Set error location when parsing memory options

Set error location so the error_report() calls will show
appropriate command-line argument or config file info.

Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 7580f231cf3f1710951416ec85df7b3f79dbaf86
      
https://github.com/qemu/qemu/commit/7580f231cf3f1710951416ec85df7b3f79dbaf86
  Author: Markus Armbruster <address@hidden>
  Date:   2016-02-19 (Fri, 19 Feb 2016)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Clean up machine selection in main().

We set machine_class to the default first, and update it to the real
one later.  Any use of machine_class in between is almost certainly
wrong (there are no such uses right now).  Set it once and for all
instead.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Laszlo Ersek <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>


  Commit: 1b3337bb1d1c3125a2140c47629f36540ac57605
      
https://github.com/qemu/qemu/commit/1b3337bb1d1c3125a2140c47629f36540ac57605
  Author: Peter Maydell <address@hidden>
  Date:   2016-02-19 (Fri, 19 Feb 2016)

  Changed paths:
    M replay/replay.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2016-02-19' into 
staging

Error reporting patches for 2016-02-19

# gpg: Signature made Fri 19 Feb 2016 12:47:50 GMT using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"

* remotes/armbru/tags/pull-error-2016-02-19:
  vl: Clean up machine selection in main().
  vl: Set error location when parsing memory options
  replay: Set error location properly when parsing options
  vl: Reset location after handling command-line arguments
  vl.c: Fix regression in machine error message

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/5cfffc30de4a...1b3337bb1d1c

reply via email to

[Prev in Thread] Current Thread [Next in Thread]