On 2 August 2011 09:21, Jim Meyering <j...@meyering.net> wrote: > > Ideally, copy_file_preserving would retain it semantics > and it would simply call your new function (containing the > guts of this one), obtain an indication of which part (if any) > failed, and then diagnose and exit. > > As you can see, there will have to be many distinct > error codes specific to this task. I suspect that > the wrapper copy_file_preserving will use a large > case statement to map each of those codes to its > corresponding diagnostic.
That's exactly the sort of guidance I was after; I'll work up something along these lines; thanks. > I glanced through your patch and spotted a leak: Thanks, indeed that return should've been a goto error_exit_2. -- http://rrt.sc3d.org