[FFmpeg-devel] [PATCH V5 2/2] configure: replace 'pr' with printf since busybox does not support pr

Guo, Yejun yejun.guo at intel.com
Sun May 5 04:38:24 EEST 2019



> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of
> Alexander Strasser
> Sent: Sunday, May 05, 2019 3:42 AM
> To: FFmpeg development discussions and patches <ffmpeg-devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH V5 2/2] configure: replace 'pr' with printf
> since busybox does not support pr
> 
> Hi all!
> 
> On 2019-04-28 00:38 +0000, Guo, Yejun wrote:
> > > From: avih [mailto:avihpit at yahoo.com]
> > > Sent: Wednesday, April 24, 2019 9:23 PM
> > > To: FFmpeg development discussions and patches
> <ffmpeg-devel at ffmpeg.org>
> > > Cc: Guo, Yejun <yejun.guo at intel.com>
> > > Subject: Re: [FFmpeg-devel] [PATCH V5 2/2] configure: replace 'pr' with
> printf
> > > since busybox does not support pr
> > >
> > > >  log_file(){
> > > > -    log BEGIN $1
> > > > -    pr -n -t $1 >> $logfile
> > > > -    log END $1
> > > > +    log BEGIN "$1"
> > > > +    log_file_i=1
> > > > +    while IFS= read -r log_file_line;do
> 
> 
> > > > +        printf '%5s  %s\n' "${log_file_i}" "${log_file_line}"
> 
> I would like to do minimal adjustment to the line quoted above:
> 
>                printf '%5d\t%s\n' "$log_file_i" "$log_file_line"

It's good.

> 
> The \t makes the output equal to the current output. I would
> prefer the %d because it makes the format a bit easier to grasp.
> 
> The removed {} pairs around log_file_i and log_file_line, aren't
> needed and without them the style should be more consistent.
> 
> 
> > > > +        log_file_i=$(($log_file_i+1))
> > > > +    done < "$1" >> "$logfile"
> > > > +    log END "$1"
> > > > }
> > >
> > > Looks good to me, no further comments (but I don't push).
> >
> > this patch set asks for push, or more comments, thanks.
> 
> It's faster than the current pr implementation.
> 
> If there are no objections to this patch in general and
> to my suggested modifications in particular, I intent
> to push it next week on friday.
> 
> 
> Thanks
>   Alexander
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list