Refactor mknkboot in preparation for beastpatcher integration.
commit1430bb05611ac7ba114829c4c209a1c199854823
authorbluebrother <bluebrother@a1c6a512-1295-4272-9138-f99709370657>
Thu, 17 Sep 2009 21:03:40 +0000 (17 21:03 +0000)
committerbluebrother <bluebrother@a1c6a512-1295-4272-9138-f99709370657>
Thu, 17 Sep 2009 21:03:40 +0000 (17 21:03 +0000)
tree1940016ab0d2b510be7c0e058128aa13e7247bbd
parent2a0b6109257d5306a6efca9e7601cfbd8a3d5352
Refactor mknkboot in preparation for beastpatcher integration.

- separate patching from main function.
- improve cleaning up open files / allocated memory on errors.
- correct check for number of arguments.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22723 a1c6a512-1295-4272-9138-f99709370657
tools/mknkboot.c