diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-12-04 19:40:43 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2011-12-04 19:40:43 +0000 |
commit | 38f03d4eaed0952bc1c866d46a10f783f2b895b2 (patch) | |
tree | 568ac45d9777e840c0889789701e2e9b79702e88 /rbutil/sansapatcher/sansapatcher.h | |
parent | 38890ac6dc1e3cebb90e60d70cea8da8009ee8da (diff) | |
download | rockbox-38f03d4eaed0952bc1c866d46a10f783f2b895b2.tar.gz rockbox-38f03d4eaed0952bc1c866d46a10f783f2b895b2.zip |
sansapatcher: factor out handling of bundled bootloaders.
Instead of handling bundled bootloaders in the sansapatcher functions leave
that to the caller. This removes the need to have Rockbox Utility specific
parts in sansapatcher. sansa_add_bootloader() now operates on an already loaded
bootloader. For loading a convenience function sansa_read_bootloader() is
added. This also introduces a new check on loading to prevent installing an
e200 bootloader on a c200 (and vice versa).
These changes will allow building a libsansapatcher for linking with Rockbox
Utility later.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31144 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/sansapatcher/sansapatcher.h')
-rw-r--r-- | rbutil/sansapatcher/sansapatcher.h | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/rbutil/sansapatcher/sansapatcher.h b/rbutil/sansapatcher/sansapatcher.h index 7416e1928b..4f08eea432 100644 --- a/rbutil/sansapatcher/sansapatcher.h +++ b/rbutil/sansapatcher/sansapatcher.h | |||
@@ -34,14 +34,12 @@ extern int sansa_verbose; | |||
34 | #define BUFFER_SIZE 8*1024*1024 | 34 | #define BUFFER_SIZE 8*1024*1024 |
35 | extern unsigned char* sansa_sectorbuf; | 35 | extern unsigned char* sansa_sectorbuf; |
36 | 36 | ||
37 | #define FILETYPE_MI4 0 | ||
38 | #define FILETYPE_INTERNAL 1 | ||
39 | |||
40 | int sansa_read_partinfo(struct sansa_t* sansa, int silent); | 37 | int sansa_read_partinfo(struct sansa_t* sansa, int silent); |
41 | int is_sansa(struct sansa_t* sansa); | 38 | int is_sansa(struct sansa_t* sansa); |
42 | int sansa_scan(struct sansa_t* sansa); | 39 | int sansa_scan(struct sansa_t* sansa); |
43 | int sansa_read_firmware(struct sansa_t* sansa, const char* filename); | 40 | int sansa_read_firmware(struct sansa_t* sansa, const char* filename); |
44 | int sansa_add_bootloader(struct sansa_t* sansa, const char* filename, int type); | 41 | unsigned int sansa_read_bootloader(struct sansa_t* sansa, const char* filename, unsigned char** bl_buffer); |
42 | int sansa_add_bootloader(struct sansa_t* sansa, const unsigned char* buf, unsigned int len); | ||
45 | int sansa_delete_bootloader(struct sansa_t* sansa); | 43 | int sansa_delete_bootloader(struct sansa_t* sansa); |
46 | int sansa_update_of(struct sansa_t* sansa,const char* filename); | 44 | int sansa_update_of(struct sansa_t* sansa,const char* filename); |
47 | int sansa_update_ppbl(struct sansa_t* sansa,const char* filename); | 45 | int sansa_update_ppbl(struct sansa_t* sansa,const char* filename); |