Re: [PATCH] dd doesn't return a failure status

2007-10-03 Thread Loïc Grenié
2007/10/3, Kazuo TAKADA <[EMAIL PROTECTED]>: > > [EMAIL PROTECTED] wrote: > {snip..} > > > >It may be faster to do > > > >if ((w = write_and_stats(...))) > > goto out_status; > > > > and > > > >return w; > > > > because write_and_stats returns 1 on failure. You can even tweak > > it to retu

Re: [PATCH] dd doesn't return a failure status

2007-10-03 Thread Kazuo TAKADA
[EMAIL PROTECTED] wrote: {snip..} > >It may be faster to do > >if ((w = write_and_stats(...))) > goto out_status; > > and > >return w; > > because write_and_stats returns 1 on failure. You can even tweak > it to return either EXIT_SUCCESS or EXIT_FAILURE and change the > if to: > >if ((w =

Re: [PATCH] dd doesn't return a failure status

2007-10-03 Thread Loïc Grenié
2007/10/3, Kazuo TAKADA <[EMAIL PROTECTED]>: > > Hi, > > If the dd command fails in a sequence of copying, it always returns > EXIT_SUCCESS. So, I can't judge whether the command had succeeded or > failed. > > Its behavior doesn't conform to POSIX. > > POSIX 1003.1: > http://www.opengroup.org/