On Tue, Jul 17, 2018 at 03:34:12PM +0200, Jakub Sitnicki wrote:
> Instead of dying let the main loop handle the error.
> This will allow us to report errors when running in daemon mode.
>
> This is a result of applying the following semantic patch:
>
> @@
> identifier F;
> identifier C;
> identifier E;
> @@
> static void F(struct ctl_context *C) {
> <...
> if (E) {
> - ctl_fatal("%s", E);
> + C->error = E;
> + return;
> }
> ...>
> }
>
> Signed-off-by: Jakub Sitnicki <[email protected]>
It's too bad that this generates code like this:
char *error = ls_by_name_or_uuid(ctx, ctx->argv[1], false, &ls);
if (error) {
ctx->error = error;
return;
}
instead of the simpler:
ctx->error = ls_by_name_or_uuid(ctx, ctx->argv[1], false, &ls);
if (ctx->error) {
return;
}
Oh well.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev