Skip to content
Browse files

cmd/fsck: correctly catch nonzero return codes of 'par2 create'.

Oops; we weren't checking the return value like we should.  Reported by
Sitaram Chamarty.
  • Loading branch information...
1 parent 3be291a commit c050eb9a3065163995bab5a5fbf6f1c666d85dc3 @apenwarr apenwarr committed Apr 1, 2010
Showing with 8 additions and 2 deletions.
  1. +8 −2 cmd/fsck-cmd.py
View
10 cmd/fsck-cmd.py
@@ -104,8 +104,14 @@ def do_pack(base, last):
code = gresult
else:
if par2_ok and opt.generate:
- par2_generate(base)
- print '%s ok' % last
+ presult = par2_generate(base)
+ if presult != 0:
+ print '%s par2 create: failed (%d)' % (last, presult)
+ code = presult
+ else:
+ print '%s ok' % last
+ else:
+ print '%s ok' % last
else:
assert(opt.generate and (not par2_ok or par2_exists))
debug(' skipped: par2 file already generated.\n')

0 comments on commit c050eb9

Please sign in to comment.
Something went wrong with that request. Please try again.