Re: [ethtool v2 4/6] Add --json command line argument parsing

2020-06-25 Thread Andrew Lunn
On Wed, Jun 24, 2020 at 10:32:58PM -0700, Stephen Hemminger wrote: > On Thu, 25 Jun 2020 02:12:42 +0200 > Andrew Lunn wrote: > > > diff --git a/internal.h b/internal.h > > index edb07bd..7135140 100644 > > --- a/internal.h > > +++ b/internal.h > > @@ -23,6 +23,8 @@ > > #include > > #include >

Re: [ethtool v2 4/6] Add --json command line argument parsing

2020-06-24 Thread Stephen Hemminger
On Thu, 25 Jun 2020 02:12:42 +0200 Andrew Lunn wrote: > diff --git a/internal.h b/internal.h > index edb07bd..7135140 100644 > --- a/internal.h > +++ b/internal.h > @@ -23,6 +23,8 @@ > #include > #include > > +#include "json_writer.h" > + > #define maybe_unused __attribute__((__unused__))

[ethtool v2 4/6] Add --json command line argument parsing

2020-06-24 Thread Andrew Lunn
Allow --json to be passed as an option to select JSON output. The option is handled in the same way as --debug, setting a variable in the command context, which can then later be used per option to select JSON outputters. Signed-off-by: Andrew Lunn --- ethtool.c| 33 ++--- inter