Re: [PATCH v7 01/20] trace-cmd library: Add support for compression algorithms

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

 



On Mon, 24 Jan 2022 15:03:35 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> > > > + * tracecmd_compress_copy_from - Copy and compress data from a file
> > > > + * @handle: compression handle
> > > > + * @fd: file descriptor to uncompressed data to copy from
> > > > + * @chunk_size: size of one compression chunk
> > > > + * @read_size: in - max bytes to read from @fd, 0 to read till the EOF
> > > > + *          out - size of the uncompressed data read from @fd    
> > >
> > > Is this an array of two?    
> > 
> > No, it is a pointer to single long long, used as input and output parameter.  
> 
> I'm confused by the comment then. What is does the above "in" and "out"
> mean? 

OK, looking at the code I see what you meant, but it should be written more
like:

 * @read_size: Pointer to max bytes to read from.
              Updates the pointer with the size of compressed data read.

Then in the description explain it more.

 * @read_size should be the address of an unsigned long long value
 * containing the max size to read from, or containing zero to read till
 * EOF. On successful return, @read_size will contain the size of the
 * unpressed data that was read.

-- Steve



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

  Powered by Linux