1. 21 Dec, 2017 1 commit
  2. 04 Sep, 2017 3 commits
  3. 08 Aug, 2017 1 commit
    • Eric Blake's avatar
      maint: Include bug-reporting info in --help output · f5048cb7
      Eric Blake authored
      These days, many programs are including a bug-reporting address,
      or better yet, a link to the project web site, at the tail of
      their --help output.  However, we were not very consistent at
      doing so: only qemu-nbd and qemu-qa mentioned anything, with the
      latter pointing to an individual person instead of the project.
      
      Add a new #define that sets up a uniform string, mentioning both
      bug reporting instructions and overall project details, and which
      a downstream vendor could tweak if they want bugs to go to a
      downstream database.  Then use it in all of our binaries which
      have --help output.
      
      The canned text intentionally references http:// instead of https://
      because our https website currently causes certificate errors in
      some browsers.  That can be tweaked later once we have resolved the
      web site issued.
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: 's avatarPhilippe Mathieu-Daudé <f4bug@amsat.org>
      Message-Id: <20170803163353.19558-5-eblake@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      f5048cb7
  4. 24 Jul, 2017 2 commits
  5. 14 Jul, 2017 2 commits
    • Eric Blake's avatar
      nbd: Implement NBD_INFO_BLOCK_SIZE on client · 081dd1fe
      Eric Blake authored
      The upstream NBD Protocol has defined a new extension to allow
      the server to advertise block sizes to the client, as well as
      a way for the client to inform the server whether it intends to
      obey block sizes.
      
      When using the block layer as the client, we will obey block
      sizes; but when used as 'qemu-nbd -c' to hand off to the
      kernel nbd module as the client, we are still waiting for the
      kernel to implement a way for us to learn if it will honor
      block sizes (perhaps by an addition to sysfs, rather than an
      ioctl), as well as any way to tell the kernel what additional
      block sizes to obey (NBD_SET_BLKSIZE appears to be accurate
      for the minimum size, but preferred and maximum sizes would
      probably be new ioctl()s), so until then, we need to make our
      request for block sizes conditional.
      
      When using ioctl(NBD_SET_BLKSIZE) to hand off to the kernel,
      use the minimum block size as the sector size if it is larger
      than 512, which also has the nice effect of cooperating with
      (non-qemu) servers that don't do read-modify-write when
      exposing a block device with 4k sectors; it might also allow
      us to visit a file larger than 2T on a 32-bit kernel.
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170707203049.534-10-eblake@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      081dd1fe
    • Eric Blake's avatar
      nbd: Create struct for tracking export info · 004a89fc
      Eric Blake authored
      The NBD Protocol is introducing some additional information
      about exports, such as minimum request size and alignment, as
      well as an advertised maximum request size.  It will be easier
      to feed this information back to the block layer if we gather
      all the information into a struct, rather than adding yet more
      pointer parameters during negotiation.
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170707203049.534-2-eblake@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      004a89fc
  6. 15 Jun, 2017 2 commits
    • Max Reitz's avatar
      qemu-nbd: Ignore SIGPIPE · 041e32b8
      Max Reitz authored
      qemu proper has done so for 13 years
      (8a7ddc38), qemu-img and qemu-io have
      done so for four years (526eda14).
      Ignoring this signal is especially important in qemu-nbd because
      otherwise a client can easily take down the qemu-nbd server by dropping
      the connection when the server wants to send something, for example:
      
      $ qemu-nbd -x foo -f raw -t null-co:// &
      [1] 12726
      $ qemu-io -c quit nbd://localhost/bar
      can't open device nbd://localhost/bar: No export with name 'bar' available
      [1]  + 12726 broken pipe  qemu-nbd -x foo -f raw -t null-co://
      
      In this case, the client sends an NBD_OPT_ABORT and closes the
      connection (because it is not required to wait for a reply), but the
      server replies with an NBD_REP_ACK (because it is required to reply).
      Signed-off-by: 's avatarMax Reitz <mreitz@redhat.com>
      Message-Id: <20170611123714.31292-1-mreitz@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      041e32b8
    • Eric Blake's avatar
      nbd: Fix regression on resiliency to port scan · 0c9390d9
      Eric Blake authored
      Back in qemu 2.5, qemu-nbd was immune to port probes (a transient
      server would not quit, regardless of how many probe connections
      came and went, until a connection actually negotiated).  But we
      broke that in commit ee7d7aab when removing the return value to
      nbd_client_new(), although that patch also introduced a bug causing
      an assertion failure on a client that fails negotiation.  We then
      made it worse during refactoring in commit 1a6245a5 (a segfault
      before we could even assert); the (masked) assertion was cleaned
      up in d3780c2d (still in 2.6), and just recently we finally fixed
      the segfault ("nbd: Fully intialize client in case of failed
      negotiation").  But that still means that ever since we added
      TLS support to qemu-nbd, we have been vulnerable to an ill-timed
      port-scan being able to cause a denial of service by taking down
      qemu-nbd before a real client has a chance to connect.
      
      Since negotiation is now handled asynchronously via coroutines,
      we no longer have a synchronous point of return by re-adding a
      return value to nbd_client_new().  So this patch instead wires
      things up to pass the negotiation status through the close_fn
      callback function.
      
      Simple test across two terminals:
      $ qemu-nbd -f raw -p 30001 file
      $ nmap 127.0.0.1 -p 30001 && \
        qemu-io -c 'r 0 512' -f raw nbd://localhost:30001
      
      Note that this patch does not change what constitutes successful
      negotiation (thus, a client must enter transmission phase before
      that client can be considered as a reason to terminate the server
      when the connection ends).  Perhaps we may want to tweak things
      in a later patch to also treat a client that uses NBD_OPT_ABORT
      as being a 'successful' negotiation (the client correctly talked
      the NBD protocol, and informed us it was not going to use our
      export after all), but that's a discussion for another day.
      
      Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451614Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170608222617.20376-1-eblake@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      0c9390d9
  7. 07 Jun, 2017 1 commit
    • Eric Blake's avatar
      nbd: Fully initialize client in case of failed negotiation · df8ad9f1
      Eric Blake authored
      If a non-NBD client connects to qemu-nbd, we would end up with
      a SIGSEGV in nbd_client_put() because we were trying to
      unregister the client's association to the export, even though
      we skipped inserting the client into that list.  Easy trigger
      in two terminals:
      
      $ qemu-nbd -p 30001 --format=raw file
      $ nmap 127.0.0.1 -p 30001
      
      nmap claims that it thinks it connected to a pago-services1
      server (which probably means nmap could be updated to learn the
      NBD protocol and give a more accurate diagnosis of the open
      port - but that's not our problem), then terminates immediately,
      so our call to nbd_negotiate() fails.  The fix is to reorder
      nbd_co_client_start() to ensure that all initialization occurs
      before we ever try talking to a client in nbd_negotiate(), so
      that the teardown sequence on negotiation failure doesn't fault
      while dereferencing a half-initialized object.
      
      While debugging this, I also noticed that nbd_update_server_watch()
      called by nbd_client_closed() was still adding a channel to accept
      the next client, even when the state was no longer RUNNING.  That
      is fixed by making nbd_can_accept() pay attention to the current
      state.
      
      Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1451614Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      Message-Id: <20170527030421.28366-1-eblake@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      df8ad9f1
  8. 06 Jun, 2017 1 commit
  9. 09 May, 2017 3 commits
  10. 19 Mar, 2017 1 commit
    • Paolo Bonzini's avatar
      qemu-ga: obey LISTEN_PID when using systemd socket activation · 53fabd4b
      Paolo Bonzini authored
      qemu-ga's socket activation support was not obeying the LISTEN_PID
      environment variable, which avoids that a process uses a socket-activation
      file descriptor meant for its parent.
      
      Mess can for example ensue if a process forks a children before consuming
      the socket-activation file descriptor and therefore setting O_CLOEXEC
      on it.
      
      Luckily, qemu-nbd also got socket activation code, and its copy does
      support LISTEN_PID.  Some extra fixups are needed to ensure that the
      code can be used for both, but that's what this patch does.  The
      main change is to replace get_listen_fds's "consume" argument with
      the FIRST_SOCKET_ACTIVATION_FD macro from the qemu-nbd code.
      
      Cc: "Richard W.M. Jones" <rjones@redhat.com>
      Cc: Stefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      53fabd4b
  11. 16 Feb, 2017 1 commit
    • Richard W.M. Jones's avatar
      qemu-nbd: Implement socket activation. · a721f53b
      Richard W.M. Jones authored
      Socket activation (sometimes known as systemd socket activation)
      allows an Internet superserver to pass a pre-opened listening socket
      to the process, instead of having qemu-nbd open a socket itself.  This
      is done via the LISTEN_FDS and LISTEN_PID environment variables, and a
      standard file descriptor range.
      
      This change partially implements socket activation for qemu-nbd.  If
      the environment variables are set correctly, then socket activation
      will happen automatically, otherwise everything works as before.  The
      limitation is that LISTEN_FDS must be 1.
      Signed-off-by: 's avatarRichard W.M. Jones <rjones@redhat.com>
      Message-Id: <20170204100317.32425-2-rjones@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      a721f53b
  12. 02 Nov, 2016 1 commit
  13. 24 Oct, 2016 1 commit
  14. 12 Oct, 2016 1 commit
    • Daniel P. Berrange's avatar
      trace: provide mechanism for registering trace events · fe4db84d
      Daniel P. Berrange authored
      Remove the notion of there being a single global array
      of trace events, by introducing a method for registering
      groups of events.
      
      The module_call_init() needs to be invoked at the start
      of any program that wants to make use of the trace
      support. Currently this covers system emulators qemu-nbd,
      qemu-img and qemu-io.
      
      [Squashed the following fix from Daniel P. Berrange
      <berrange@redhat.com>:
      
      linux-user/bsd-user: initialize trace events subsystem
      
      The bsd-user/linux-user programs make use of the CPU emulation
      code and this now requires that the trace events subsystem
      is enabled, otherwise it'll crash trying to allocate an empty
      trace events bitmap for the CPU object.
      
      --Stefan]
      Reviewed-by: 's avatarStefan Hajnoczi <stefanha@redhat.com>
      Reviewed-by: 's avatarLluís Vilanova <vilanova@ac.upc.edu>
      Signed-off-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Message-id: 1475588159-30598-14-git-send-email-berrange@redhat.com
      Signed-off-by: 's avatarStefan Hajnoczi <stefanha@redhat.com>
      fe4db84d
  15. 06 Oct, 2016 1 commit
  16. 05 Sep, 2016 1 commit
    • Kevin Wolf's avatar
      nbd-server: Use a separate BlockBackend · cd7fca95
      Kevin Wolf authored
      The builtin NBD server uses its own BlockBackend now instead of reusing
      the monitor/guest device one.
      
      This means that it has its own writethrough setting now. The builtin
      NBD server always uses writeback caching now regardless of whether the
      guest device has WCE enabled. qemu-nbd respects the cache mode given on
      the command line.
      
      We still need to keep a reference to the monitor BB because we put an
      eject notifier on it, but we don't use it for any I/O.
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      Reviewed-by: 's avatarMax Reitz <mreitz@redhat.com>
      cd7fca95
  17. 03 Aug, 2016 1 commit
    • Eric Blake's avatar
      nbd: Limit nbdflags to 16 bits · 7423f417
      Eric Blake authored
      Rather than asserting that nbdflags is within range, just give
      it the correct type to begin with :)  nbdflags corresponds to
      the per-export portion of NBD Protocol "transmission flags", which
      is 16 bits in response to NBD_OPT_EXPORT_NAME and NBD_OPT_GO.
      
      Furthermore, upstream NBD has never passed the global flags to
      the kernel via ioctl(NBD_SET_FLAGS) (the ioctl was first
      introduced in NBD 2.9.22; then a latent bug in NBD 3.1 actually
      tried to OR the global flags with the transmission flags, with
      the disaster that the addition of NBD_FLAG_NO_ZEROES in 3.9
      caused all earlier NBD 3.x clients to treat every export as
      read-only; NBD 3.10 and later intentionally clip things to 16
      bits to pass only transmission flags).  Qemu should follow suit,
      since the current two global flags (NBD_FLAG_FIXED_NEWSTYLE
      and NBD_FLAG_NO_ZEROES) have no impact on the kernel's behavior
      during transmission.
      
      CC: qemu-stable@nongnu.org
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      
      Message-Id: <1469129688-22848-3-git-send-email-eblake@redhat.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      7423f417
  18. 28 Jun, 2016 1 commit
  19. 16 Jun, 2016 1 commit
    • Peter Maydell's avatar
      nbd: Don't use *_to_cpup() functions · 773dce3c
      Peter Maydell authored
      The *_to_cpup() functions are not very useful, as they simply do
      a pointer dereference and then a *_to_cpu(). Instead use either:
       * ld*_*_p(), if the data is at an address that might not be
         correctly aligned for the load
       * a local dereference and *_to_cpu(), if the pointer is
         the correct type and known to be correctly aligned
      Signed-off-by: 's avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <1465570836-22211-1-git-send-email-peter.maydell@linaro.org>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      773dce3c
  20. 20 May, 2016 1 commit
  21. 19 May, 2016 1 commit
  22. 12 May, 2016 1 commit
  23. 28 Apr, 2016 1 commit
    • Markus Armbruster's avatar
      qom: -object error messages lost location, restore it · 51b9b478
      Markus Armbruster authored
      qemu_opts_foreach() runs its callback with the error location set to
      the option's location.  Any errors the callback reports use the
      option's location automatically.
      
      Commit 90998d58 moved the actual error reporting from "inside"
      qemu_opts_foreach() to after it.  Here's a typical hunk:
      
      	 if (qemu_opts_foreach(qemu_find_opts("object"),
          -                          object_create,
          -                          object_create_initial, NULL)) {
          +                          user_creatable_add_opts_foreach,
          +                          object_create_initial, &err)) {
          +        error_report_err(err);
      	     exit(1);
      	 }
      
      Before, object_create() reports from within qemu_opts_foreach(), using
      the option's location.  Afterwards, we do it after
      qemu_opts_foreach(), using whatever location happens to be current
      there.  Commonly a "none" location.
      
      This is because Error objects don't have location information.
      Problematic.
      
      Reproducer:
      
          $ qemu-system-x86_64 -nodefaults -display none -object secret,id=foo,foo=bar
          qemu-system-x86_64: Property '.foo' not found
      
      Note no location.  This commit restores it:
      
          qemu-system-x86_64: -object secret,id=foo,foo=bar: Property '.foo' not found
      
      Note that the qemu_opts_foreach() bug just fixed could mask the bug
      here: if the location it leaves dangling hasn't been clobbered, yet,
      it's the correct one.
      Reported-by: 's avatarEric Blake <eblake@redhat.com>
      Cc: Daniel P. Berrange <berrange@redhat.com>
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1461767349-15329-4-git-send-email-armbru@redhat.com>
      Reviewed-by: 's avatarDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: 's avatarEric Blake <eblake@redhat.com>
      [Paragraph on Error added to commit message]
      51b9b478
  24. 15 Apr, 2016 1 commit
    • Pavel Butsykin's avatar
      nbd: fix assert() on qemu-nbd stop · 23994a5f
      Pavel Butsykin authored
      From time to time qemu-nbd is crashing on the following assert:
          assert(state == TERMINATING);
          nbd_export_closed
          nbd_export_put
          main
      and the state at the moment of the crash is evaluated to TERMINATE.
      
      During shutdown process of the client the nbd_client_thread thread sends
      SIGTERM signal and the main thread calls the nbd_client_closed callback.
      If the SIGTERM callback will be executed after change the state to
      TERMINATING, then the state will once again be TERMINATE.
      
      To solve the issue, we must change the state to TERMINATE only if the state
      is RUNNING. In the other case we are shutting down already.
      Signed-off-by: 's avatarPavel Butsykin <pbutsykin@virtuozzo.com>
      Signed-off-by: 's avatarDenis V. Lunev <den@openvz.org>
      CC: Paolo Bonzini <pbonzini@redhat.com>
      Message-id: 1460629215-11567-1-git-send-email-den@openvz.org
      Signed-off-by: 's avatarMax Reitz <mreitz@redhat.com>
      23994a5f
  25. 12 Apr, 2016 1 commit
  26. 07 Apr, 2016 1 commit
  27. 30 Mar, 2016 1 commit
  28. 22 Mar, 2016 2 commits
    • Veronia Bahaa's avatar
      util: move declarations out of qemu-common.h · f348b6d1
      Veronia Bahaa authored
      Move declarations out of qemu-common.h for functions declared in
      utils/ files: e.g. include/qemu/path.h for utils/path.c.
      Move inline functions out of qemu-common.h and into new files (e.g.
      include/qemu/bcd.h)
      Signed-off-by: 's avatarVeronia Bahaa <veroniabahaa@gmail.com>
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      f348b6d1
    • Markus Armbruster's avatar
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster authored
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: 's avatarPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  29. 18 Mar, 2016 1 commit
    • Eric Blake's avatar
      qapi: Don't special-case simple union wrappers · 32bafa8f
      Eric Blake authored
      Simple unions were carrying a special case that hid their 'data'
      QMP member from the resulting C struct, via the hack method
      QAPISchemaObjectTypeVariant.simple_union_type().  But by using
      the work we started by unboxing flat union and alternate
      branches, coupled with the ability to visit the members of an
      implicit type, we can now expose the simple union's implicit
      type in qapi-types.h:
      
      | struct q_obj_ImageInfoSpecificQCow2_wrapper {
      |     ImageInfoSpecificQCow2 *data;
      | };
      |
      | struct q_obj_ImageInfoSpecificVmdk_wrapper {
      |     ImageInfoSpecificVmdk *data;
      | };
      ...
      | struct ImageInfoSpecific {
      |     ImageInfoSpecificKind type;
      |     union { /* union tag is @type */
      |         void *data;
      |-        ImageInfoSpecificQCow2 *qcow2;
      |-        ImageInfoSpecificVmdk *vmdk;
      |+        q_obj_ImageInfoSpecificQCow2_wrapper qcow2;
      |+        q_obj_ImageInfoSpecificVmdk_wrapper vmdk;
      |     } u;
      | };
      
      Doing this removes asymmetry between QAPI's QMP side and its
      C side (both sides now expose 'data'), and means that the
      treatment of a simple union as sugar for a flat union is now
      equivalent in both languages (previously the two approaches used
      a different layer of dereferencing, where the simple union could
      be converted to a flat union with equivalent C layout but
      different {} on the wire, or to an equivalent QMP wire form
      but with different C representation).  Using the implicit type
      also lets us get rid of the simple_union_type() hack.
      
      Of course, now all clients of simple unions have to adjust from
      using su->u.member to using su->u.member.data; while this touches
      a number of files in the tree, some earlier cleanup patches
      helped minimize the change to the initialization of a temporary
      variable rather than every single member access.  The generated
      qapi-visit.c code is also affected by the layout change:
      
      |@@ -7393,10 +7393,10 @@ void visit_type_ImageInfoSpecific_member
      |     }
      |     switch (obj->type) {
      |     case IMAGE_INFO_SPECIFIC_KIND_QCOW2:
      |-        visit_type_ImageInfoSpecificQCow2(v, "data", &obj->u.qcow2, &err);
      |+        visit_type_q_obj_ImageInfoSpecificQCow2_wrapper_members(v, &obj->u.qcow2, &err);
      |         break;
      |     case IMAGE_INFO_SPECIFIC_KIND_VMDK:
      |-        visit_type_ImageInfoSpecificVmdk(v, "data", &obj->u.vmdk, &err);
      |+        visit_type_q_obj_ImageInfoSpecificVmdk_wrapper_members(v, &obj->u.vmdk, &err);
      |         break;
      |     default:
      |         abort();
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      Message-Id: <1458254921-17042-13-git-send-email-eblake@redhat.com>
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      32bafa8f
  30. 17 Mar, 2016 1 commit
    • Max Reitz's avatar
      blockdev: Split monitor reference from BB creation · efaa7c4e
      Max Reitz authored
      Before this patch, blk_new() automatically assigned a name to the new
      BlockBackend and considered it referenced by the monitor. This patch
      removes the implicit monitor_add_blk() call from blk_new() (and
      consequently the monitor_remove_blk() call from blk_delete(), too) and
      thus blk_new() (and related functions) no longer take a BB name
      argument.
      
      In fact, there is only a single point where blk_new()/blk_new_open() is
      called and the new BB is monitor-owned, and that is in blockdev_init().
      Besides thus relieving us from having to invent names for all of the BBs
      we use in qemu-img, this fixes a bug where qemu cannot create a new
      image if there already is a monitor-owned BB named "image".
      
      If a BB and its BDS tree are created in a single operation, as of this
      patch the BDS tree will be created before the BB is given a name
      (whereas it was the other way around before). This results in minor
      change to the output of iotest 087, whose reference output is amended
      accordingly.
      Signed-off-by: 's avatarMax Reitz <mreitz@redhat.com>
      Signed-off-by: 's avatarKevin Wolf <kwolf@redhat.com>
      efaa7c4e
  31. 05 Mar, 2016 1 commit
    • Eric Blake's avatar
      util: Shorten references into SocketAddress · 0399293e
      Eric Blake authored
      An upcoming patch will alter how simple unions, like SocketAddress,
      are laid out, which will impact all lines of the form 'addr->u.XXX'
      (expanding it to the longer 'addr->u.XXX.data').  For better
      legibility in that patch, and less need for line wrapping, it's better
      to use a temporary variable to reduce the effect of a layout change to
      just the variable initializations, rather than every reference within
      a SocketAddress.  Also, take advantage of some C99 initialization where
      it makes sense (simplifying g_new0() to g_new()).
      Signed-off-by: 's avatarEric Blake <eblake@redhat.com>
      Message-Id: <1457021813-10704-7-git-send-email-eblake@redhat.com>
      Signed-off-by: 's avatarMarkus Armbruster <armbru@redhat.com>
      0399293e
  32. 23 Feb, 2016 1 commit