Re: [PATCH] libtraceeval: Add traceeval_init_data_size()

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

 



On Wed, Sep 27, 2023 at 09:09:04AM -0400, Steven Rostedt wrote:
> From: "Steven Rostedt (Google)" <rostedt@xxxxxxxxxxx>
> 
> In the future, the traceeval_type and traceeval_data may need to include
> more information and be expanded. If that happens, it will break backward
> compatibility for older applications using the newer library.
> 
> To be able to handle backward compatibility in this situation, have the
> traceeval_init() turn into traceeval_init_data_size() which takes the
> sizeof struct traceeval_type and struct traceeval_data. Make
> traceeval_init() into a macro that calls this function passing in the
> sizeof(struct traceeval_type) and sizeof(struct traceeval_data). This way
> if the sizes change for either one, the new code will know if the
> application is using the new interface or the older one, and can
> can keep the older one still functioning properly.
> 
> Signed-off-by: Steven Rostedt (Google) <rostedt@xxxxxxxxxxx>

Reviewed-by: Ross Zwisler <zwisler@xxxxxxxxxx>




[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux