qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 98cb89: error: error_setg_errno(): errno gets


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 98cb89: error: error_setg_errno(): errno gets preserved
Date: Fri, 20 Jan 2017 06:30:04 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 98cb89af4df7e1776ce418ed6167b6e214a64435
      
https://github.com/qemu/qemu/commit/98cb89af4df7e1776ce418ed6167b6e214a64435
  Author: Sascha Silbe <address@hidden>
  Date:   2017-01-19 (Thu, 19 Jan 2017)

  Changed paths:
    M include/qapi/error.h

  Log Message:
  -----------
  error: error_setg_errno(): errno gets preserved

C11 allows errno to be clobbered by pretty much any library function
call, so in general callers need to take care to save errno before
calling other functions.

However, for error reporting functions this is rather awkward and can
make the code on the caller side more complicated than
necessary. error_setg_errno() already takes care of preserving errno
and some functions rely on that, so just promise that we continue to
do so in the future.

Signed-off-by: Sascha Silbe <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 0d6b50d474090b9085c595e2475c40cfdc092411
      
https://github.com/qemu/qemu/commit/0d6b50d474090b9085c595e2475c40cfdc092411
  Author: Marc-André Lureau <address@hidden>
  Date:   2017-01-19 (Thu, 19 Jan 2017)

  Changed paths:
    M monitor.c

  Log Message:
  -----------
  error: Report certain hints on stderr when no monitor

Hints printed with error_printf_unless_qmp() are suppressed outside
monitor context.  Reproducer:

    $ qemu-system-x86_64 -m 1Z
    qemu-system-x86_64: -m 1Z: Parameter 'size' expects a size

Print to stderr instead.  The reproducer now additionally prints:

    You may use k, M, G or T suffixes for kilobytes, megabytes, gigabytes and 
terabytes.

Signed-off-by: Marc-André Lureau <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
[Commit message tweaked]
Signed-off-by: Markus Armbruster <address@hidden>


  Commit: 6ffefe7ff785b3abb990b6300023f8eafc790127
      
https://github.com/qemu/qemu/commit/6ffefe7ff785b3abb990b6300023f8eafc790127
  Author: Peter Maydell <address@hidden>
  Date:   2017-01-20 (Fri, 20 Jan 2017)

  Changed paths:
    M include/qapi/error.h
    M monitor.c

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

Error reporting patches for 2017-01-19

# gpg: Signature made Thu 19 Jan 2017 14:51:17 GMT
# gpg:                using RSA key 0x3870B400EB918653
# gpg: Good signature from "Markus Armbruster <address@hidden>"
# gpg:                 aka "Markus Armbruster <address@hidden>"
# Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867  4E5F 3870 B400 EB91 8653

* remotes/armbru/tags/pull-error-2017-01-19:
  error: Report certain hints on stderr when no monitor
  error: error_setg_errno(): errno gets preserved

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


Compare: https://github.com/qemu/qemu/compare/28f5e970a69f...6ffefe7ff785

reply via email to

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