[ovs-dev] [PATCH 1/2] ovs-ofctl: Print the offending flow on error when parsing from a file.
Ben Pfaff
blp at nicira.com
Fri Jun 17 16:20:30 UTC 2011
On Fri, Jun 17, 2011 at 02:53:58AM -0700, Reid Price wrote:
> > + if (verbose) {
> > + fprintf(stderr, "%s:\n", str_);
> > + }
> > + ovs_fatal(verbose, str_, "only %d registers
> > supported", FLOW_N_REGS);
> >
> Is this on purpose?
Oops, I agree with Reid that this one and the next one should be
ofp_fatal().
>
> > }
> > parse_reg_value(&fm->cr, reg_idx, value);
> > } else if (!strcmp(name, "duration")
> > @@ -885,10 +903,12 @@ parse_ofp_str(struct flow_mod *fm, struct ofpbuf
> > *actions, char *string)
> > * "ovs-ofctl dump-flows" back into commands that parse
> > * flows. */
> > } else {
> > - ovs_fatal(0, "unknown keyword %s", name);
> > + ovs_fatal(verbose, str_, "unknown keyword %s", name);
> >
>
> Should this be ofp_fatal?
>
>
> > }
> > }
> > }
> > +
> > + free(string);
> >
>
> I assume we don't care about missing this if you hit a fatal.
Yeah, it doesn't matter.
Thanks,
Ben.
More information about the dev
mailing list