qemu-e2k/hw/9pfs
Markus Armbruster 4b5766488f error: Fix use of error_prepend() with &error_fatal, &error_abort
From include/qapi/error.h:

  * Pass an existing error to the caller with the message modified:
  *     error_propagate(errp, err);
  *     error_prepend(errp, "Could not frobnicate '%s': ", name);

Fei Li pointed out that doing error_propagate() first doesn't work
well when @errp is &error_fatal or &error_abort: the error_prepend()
is never reached.

Since I doubt fixing the documentation will stop people from getting
it wrong, introduce error_propagate_prepend(), in the hope that it
lures people away from using its constituents in the wrong order.
Update the instructions in error.h accordingly.

Convert existing error_prepend() next to error_propagate to
error_propagate_prepend().  If any of these get reached with
&error_fatal or &error_abort, the error messages improve.  I didn't
check whether that's the case anywhere.

Cc: Fei Li <fli@suse.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20181017082702.5581-2-armbru@redhat.com>
2018-10-19 14:51:34 +02:00
..
9p-handle.c 9p: Properly check/translate flags in unlinkat 2018-06-07 12:17:22 +02:00
9p-local.c error: Fix use of error_prepend() with &error_fatal, &error_abort 2018-10-19 14:51:34 +02:00
9p-local.h
9p-posix-acl.c
9p-proxy.c 9p: proxy: Fix size passed to connect 2018-06-07 12:17:21 +02:00
9p-proxy.h
9p-synth.c 9p: fix leak in synth_name_to_path() 2018-02-19 18:27:32 +01:00
9p-synth.h
9p-util.c 9p: Move a couple xattr functions to 9p-util 2018-06-07 12:17:22 +02:00
9p-util.h 9p: Move a couple xattr functions to 9p-util 2018-06-07 12:17:22 +02:00
9p-xattr-user.c
9p-xattr.c 9p: Move a couple xattr functions to 9p-util 2018-06-07 12:17:22 +02:00
9p-xattr.h
9p.c 9p: xattr: Properly translate xattrcreate flags 2018-06-07 12:17:22 +02:00
9p.h 9p: xattr: Properly translate xattrcreate flags 2018-06-07 12:17:22 +02:00
codir.c
cofile.c
cofs.c
coth.c
coth.h
coxattr.c
Makefile.objs hw: make virtio devices configurable via default-configs/ 2018-06-01 15:14:31 +02:00
trace-events 9p: add trace event for v9fs_setattr() 2018-05-02 08:59:24 +02:00
virtio-9p-device.c
virtio-9p.h
xen-9p-backend.c xen: remove other open-coded use of libxengnttab 2018-05-22 11:43:21 -07:00
xen-9pfs.h