qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 092b21: vl: Report failure to sandbox at most


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 092b21: vl: Report failure to sandbox at most once
Date: Tue, 09 Jun 2015 03:30:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 092b21aa7edf7962248e731cddaf5350d268e333
      
https://github.com/qemu/qemu/commit/092b21aa7edf7962248e731cddaf5350d268e333
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-08 (Mon, 08 Jun 2015)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Report failure to sandbox at most once

It's reported once per -sandbox on.  Stop on the first failure, like
we do for other options.

Not fixed: "-sandbox on -sandbox off" should leave the sandbox off.
It doesn't.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 8416abb3b0f42132fc6346c439ec543635075135
      
https://github.com/qemu/qemu/commit/8416abb3b0f42132fc6346c439ec543635075135
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-08 (Mon, 08 Jun 2015)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Print -device help at most once

We print it once for each -device help.  Not helpful.  Stop after the
first one.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 8122928a52248e28513c79d9b9929c6d20c866ea
      
https://github.com/qemu/qemu/commit/8122928a52248e28513c79d9b9929c6d20c866ea
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-08 (Mon, 08 Jun 2015)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Fail right after first bad -object

Failure to create an object with -object is a fatal error.  However,
we delay the actual exit until all -object are processed.  On the one
hand, this permits detection of genuine additional errors.  On the
other hand, it can muddy the waters with uninteresting additional
errors, e.g. when a later -object tries to reference a prior one that
failed.

We generally stop right on the first bad option, so do that for
-object as well.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: a4c7367f7dd9348f94dc4298571ed515b8160a27
      
https://github.com/qemu/qemu/commit/a4c7367f7dd9348f94dc4298571ed515b8160a27
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-08 (Mon, 08 Jun 2015)

  Changed paths:
    M block/blkdebug.c
    M hw/core/qdev-properties-system.c
    M include/qemu/option.h
    M net/net.c
    M net/vhost-user.c
    M numa.c
    M tpm.c
    M util/qemu-config.c
    M util/qemu-option.c
    M vl.c

  Log Message:
  -----------
  QemuOpts: Drop qemu_opts_foreach() parameter abort_on_failure

When the argument is non-zero, qemu_opts_foreach() stops on callback
returning non-zero, and returns that value.

When the argument is zero, it doesn't stop, and returns the bit-wise
inclusive or of all the return values.  Funky :)

The callers that pass zero could just as well pass one, because their
callbacks can't return anything but zero:

* qemu_add_globals()'s callback qdev_add_one_global()

* qemu_config_write()'s callback config_write_opts()

* main()'s callbacks default_driver_check(), drive_enable_snapshot(),
  vnc_init_func()

Drop the parameter, and always stop.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Acked-by: Kevin Wolf <address@hidden>


  Commit: 28d0de7a4fb721b06de72970bd163f5183c2188b
      
https://github.com/qemu/qemu/commit/28d0de7a4fb721b06de72970bd163f5183c2188b
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-09 (Tue, 09 Jun 2015)

  Changed paths:
    M block/blkdebug.c
    M hw/core/qdev-properties-system.c
    M include/qemu/option.h
    M include/ui/console.h
    M net/net.c
    M net/vhost-user.c
    M numa.c
    M tpm.c
    M ui/vnc.c
    M util/qemu-config.c
    M util/qemu-option.c
    M vl.c

  Log Message:
  -----------
  QemuOpts: Convert qemu_opts_foreach() to Error

Retain the function value for now, to permit selective conversion of
its callers.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Acked-by: Kevin Wolf <address@hidden>


  Commit: 8809cfc38e4e93884d664bb00108fc71b423f589
      
https://github.com/qemu/qemu/commit/8809cfc38e4e93884d664bb00108fc71b423f589
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-09 (Tue, 09 Jun 2015)

  Changed paths:
    M block/blkdebug.c

  Log Message:
  -----------
  blkdebug: Simplify passing of Error through qemu_opts_foreach()

Cc: Kevin Wolf <address@hidden>
Cc: address@hidden
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Acked-by: Kevin Wolf <address@hidden>


  Commit: 1640b200d53e3d981f12a192fe84b7bb7958c065
      
https://github.com/qemu/qemu/commit/1640b200d53e3d981f12a192fe84b7bb7958c065
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-09 (Tue, 09 Jun 2015)

  Changed paths:
    M include/qemu/option.h
    M net/vhost-user.c
    M qdev-monitor.c
    M ui/spice-core.c
    M util/qemu-config.c
    M util/qemu-option.c
    M vl.c

  Log Message:
  -----------
  QemuOpts: Drop qemu_opt_foreach() parameter abort_on_failure

When the argument is non-zero, qemu_opt_foreach() stops on callback
returning non-zero, and returns that value.

When the argument is zero, it doesn't stop, and returns the callback's
value from the last iteration.

The two callers that pass zero could just as well pass one:

* qemu_spice_init()'s callback add_channel() either returns zero or
  exit()s.

* config_write_opts()'s callback config_write_opt() always returns
  zero.

Drop the parameter, and always stop.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 71df1d833776647fc12f5bbcd6d6fe4c5e931094
      
https://github.com/qemu/qemu/commit/71df1d833776647fc12f5bbcd6d6fe4c5e931094
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-09 (Tue, 09 Jun 2015)

  Changed paths:
    M include/qemu/option.h
    M net/vhost-user.c
    M qdev-monitor.c
    M ui/spice-core.c
    M util/qemu-config.c
    M util/qemu-option.c
    M vl.c

  Log Message:
  -----------
  QemuOpts: Convert qemu_opt_foreach() to Error

Retain the function value for now, to permit selective conversion of
its callers.

Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 8190483196148f765c65785876f7b893d64b6cdd
      
https://github.com/qemu/qemu/commit/8190483196148f765c65785876f7b893d64b6cdd
  Author: Markus Armbruster <address@hidden>
  Date:   2015-06-09 (Tue, 09 Jun 2015)

  Changed paths:
    M net/vhost-user.c

  Log Message:
  -----------
  vhost-user: Improve -netdev/netdev_add/-net/... error reporting

When -netdev vhost-user fails, it first reports a specific error, then
one or more generic ones, like this:

    $ qemu-system-x86_64 -netdev vhost-user,id=foo,chardev=xxx
    qemu-system-x86_64: -netdev vhost-user,id=foo,chardev=xxx: chardev "xxx" 
not found
    qemu-system-x86_64: -netdev vhost-user,id=foo,chardev=xxx: No suitable 
chardev found
    qemu-system-x86_64: -netdev vhost-user,id=foo,chardev=xxx: Device 
'vhost-user' could not be initialized

With the command line, the messages go to stderr.  In HMP, they go to
the monitor.  In QMP, the last one becomes the error reply, and the
others go to stderr.

Convert net_init_vhost_user() and its helpers to Error.  This
suppresses the unwanted unspecific error messages, and makes the
specific error the QMP error reply.

Cc: Stefan Hajnoczi <address@hidden>
Cc: Jason Wang <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>


  Commit: b781a60b1054e06de6733b75dd1489afff9c3276
      
https://github.com/qemu/qemu/commit/b781a60b1054e06de6733b75dd1489afff9c3276
  Author: Peter Maydell <address@hidden>
  Date:   2015-06-09 (Tue, 09 Jun 2015)

  Changed paths:
    M block/blkdebug.c
    M hw/core/qdev-properties-system.c
    M include/qemu/option.h
    M include/ui/console.h
    M net/net.c
    M net/vhost-user.c
    M numa.c
    M qdev-monitor.c
    M tpm.c
    M ui/spice-core.c
    M ui/vnc.c
    M util/qemu-config.c
    M util/qemu-option.c
    M vl.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2015-06-09' into 
staging

Error reporting patches

# gpg: Signature made Tue Jun  9 06:42:15 2015 BST using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"

* remotes/armbru/tags/pull-error-2015-06-09:
  vhost-user: Improve -netdev/netdev_add/-net/... error reporting
  QemuOpts: Convert qemu_opt_foreach() to Error
  QemuOpts: Drop qemu_opt_foreach() parameter abort_on_failure
  blkdebug: Simplify passing of Error through qemu_opts_foreach()
  QemuOpts: Convert qemu_opts_foreach() to Error
  QemuOpts: Drop qemu_opts_foreach() parameter abort_on_failure
  vl: Fail right after first bad -object
  vl: Print -device help at most once
  vl: Report failure to sandbox at most once

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


Compare: https://github.com/qemu/qemu/compare/ee09f84e6bf5...b781a60b1054

reply via email to

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