mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 21:22:39 -05:00
rbutil: allow checking bootloader installer capabilities
Instead of checking for certain hardcoded strings, fetch the actual capability bitmask by instantiating an installer and querying it. Change-Id: I7883d9c1e90da37ee7c0189732ac626685adbfa1
This commit is contained in:
parent
42999913ba
commit
cbb57fe714
6 changed files with 44 additions and 22 deletions
|
|
@ -27,10 +27,6 @@
|
|||
BootloaderInstallSansa::BootloaderInstallSansa(QObject *parent)
|
||||
: BootloaderInstallBase(parent)
|
||||
{
|
||||
(void)parent;
|
||||
// initialize sector buffer. The sector buffer is part of the sansa_t
|
||||
// structure, so a second instance of this class will have its own buffer.
|
||||
sansa_alloc_buffer(&sansa, BUFFER_SIZE);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -46,6 +42,12 @@ BootloaderInstallSansa::~BootloaderInstallSansa()
|
|||
*/
|
||||
bool BootloaderInstallSansa::install(void)
|
||||
{
|
||||
// initialize sector buffer. The sector buffer is part of the sansa_t
|
||||
// structure, so a second instance of this class will have its own buffer.
|
||||
if(sansa.sectorbuf == nullptr) {
|
||||
sansa_alloc_buffer(&sansa, BUFFER_SIZE);
|
||||
}
|
||||
|
||||
if(sansa.sectorbuf == nullptr) {
|
||||
emit logItem(tr("Error: can't allocate buffer memory!"), LOGERROR);
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue