On Thu, Jun 09, 2016 at 09:51:46AM +1200, Carlin Bingham wrote:
> This adds pledge to par2 and its utilities.
> 
> The 'create' command needs cpath and wpath to create and write the pars.
> 
> The 'repair' command needs cpath to rename damaged files and delete
> partial files, and wpath to write the recovered files (at least to
> begin with).
> 
> The 'verify' command may need cpath to delete files if -p was passed.
> 
> 'repair' opens all the files it is going to write before it begins
> performing the recovery so we can drop wpath at that point. It needs to
> hold on to cpath as it deletes any partially reconstructed files if it
> encounters an error.
> 
> The 'verify' command calls the same function as 'repair' but won't hit
> the codepath with the late pledge call.
> 
> All the tests pass, but that doesn't mean much...
> 
> 
> This patch does the pledge needed by create/repair up front and then
> pledges again if running verify, this way we can pledge before the
> command line parsing. And does a different pledge for verify depending
> on whether -p is set.
> 

the promises seems correct to me, but patches needs some comments (based
on your previous description for example).

it is OK semarie@ (with additionnal comments), but I would be glad to
have maintener point of vue too.

thanks.
-- 
Sebastien Marie

Reply via email to