Improve fsm error code handling in psm
authorPanu Matilainen <pmatilai@redhat.com>
Tue, 19 Apr 2011 08:37:11 +0000 (11:37 +0300)
committerPanu Matilainen <pmatilai@redhat.com>
Tue, 19 Apr 2011 08:37:11 +0000 (11:37 +0300)
commit3eb92ff6d3030de913f2f3a4926b71c2cac07763
tree2f2c9f97b85ca76e2e0c17262f543275bb1a39e0
parent643626a32e045b44b8a9a863f889f714af408cd9
Improve fsm error code handling in psm
- Move the fsm execution to separate helper function, returning
  the most relevant exit code: if fsmSetup() failed then teardown
  return doesn't matter, but fsmTeardown() can report errors
  from missing hardlinks which we haven't checked until now.
- This also fixes enum vs int abuse on the exit code: fsm return
  codes are cpio error codes whereas psm codes are simple ok/fails.
lib/psm.c