Re: [PATCH 6/8] trace-cmd output: Set file_state of output handle after copy of headers

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

 



On Tue, 2 Mar 2021 16:51:56 +0200
Tzvetomir Stoyanov <tz.stoyanov@xxxxxxxxx> wrote:

> >         handle->file_state = state;  
> 
> The output handle should have the same state as the input handle,
> so we can just have:
> 
>       handle->file_state = tracecmd_get_file_state(ihandle);
> 
> There is exactly the same use case in tracecmd_get_output_handle_fd(),
> where the out handle is built on a partially written file.

The above is pretty much exactly what I did, but it eliminates error
checking. Should there be a file_state = TRACECMD_FILE_ERROR ?

-- Steve



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

  Powered by Linux