On 25/07/23 04:19PM, Aditya Gupta wrote: > Hi Lianbo, > > On 25/07/23 09:53AM, lijiang wrote: > > <...snip...> > > > > > > > I have seen two versions of the implementation, another one is in > > netdump.c. Can we do it like this? > > > > bool is_vmcoreinfo_empty(void) > > { > > if (dd && dd->sub_header_kdump) > > return (dd->sub_header_kdump->size_vmcoreinfo == 0); > > if (nd) > > return (nd->size_vmcoreinfo == 0); > > return true; > > } > > > > And implement it in a common file, E.g: kernel.c, put its definition to > > defs.h. So that we can call this one in netdump.c and diskdump.c. > > What do you think? > > Sure, makes sense. Will do it.
On a second thought, i am re-thinking this since have to move 'dd' and 'nd' symbols also to defs.h, which currently are statics in diskdump.c and netdump.c The proposed v2 with only 1 is_vmcoreinfo_empty implementation: https://github.com/adi-g15-ibm/crash/commit/e579a8b0e79da409ff8f354bfba6104edbaa89f4 What do you think Lianbo ? Is that okay ? Thanks, - Aditya G > > > > > Other changes are fine to me. > > > > Thanks, > - Aditya G > > > Thanks > > Lianbo > > > > > -- Crash-utility mailing list -- devel@lists.crash-utility.osci.io To unsubscribe send an email to devel-le...@lists.crash-utility.osci.io https://${domain_name}/admin/lists/devel.lists.crash-utility.osci.io/ Contribution Guidelines: https://github.com/crash-utility/crash/wiki