Re: [PATCH] dissect: introduce dissect_ctx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/06, Luc Van Oostenryck wrote:
>
> On Thu, Feb 06, 2020 at 06:01:32PM +0100, Oleg Nesterov wrote:
> > Points to the current function or to the global variable in case of
> > compound initializer.
> >
> > Kill the ugly test-dissect.c:storage() and change print_usage() to
> > report dissect_ctx->ident instead.
>
> Having the ful ident will be good, I think, but the cost is to have
> to maintain this context. I suppose it would be too painful to
> propgate this context via an additional argument to all involved
> functions?

Oh, I'd prefer to not do this. This needs to add the additional "ctx"
arg to every do_.*() function in dissect.c, and for what? IMHO, this
will just complicate the code for no reason.

I can unexport the global "struct symbol *dissect_ctx" introduced by
this patch and pass it as the additional (new) argument to every to
every callback, but I'd like to do this later, along with other
"incompatible" changes for the new tool Alexey is working on.

Thanks,

Oleg.




[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux