1
0
Fork 0
forked from len0rd/rockbox

rbutil: Fix ipodpatcher bootloader uninstall.

Fix mountpoint not passed and sectorbuf not initialized properly.

Change-Id: Ifa9d9e159767b20a51841ee422be59feca95c757
This commit is contained in:
Dominik Riebeling 2022-03-12 21:45:07 +01:00
parent 5c7b0e071f
commit ce70e34476
2 changed files with 11 additions and 5 deletions

View file

@ -42,11 +42,7 @@ BootloaderInstallIpod::~BootloaderInstallIpod()
bool BootloaderInstallIpod::install(void)
{
// initialize sector buffer. The sector buffer is part of the ipod_t
// structure, so a second instance of this class will have its own buffer.
if(ipod.sectorbuf == nullptr) {
ipod_alloc_buffer(&ipod, BUFFER_SIZE);
}
ipodInitialize(&ipod);
if(ipod.sectorbuf == nullptr) {
emit logItem(tr("Error: can't allocate buffer memory!"), LOGERROR);
@ -227,6 +223,11 @@ BootloaderInstallBase::Capabilities BootloaderInstallIpod::capabilities(void)
*/
bool BootloaderInstallIpod::ipodInitialize(struct ipod_t *ipod)
{
// initialize sector buffer. The sector buffer is part of the ipod_t
// structure, so a second instance of this class will have its own buffer.
if(ipod->sectorbuf == nullptr) {
ipod_alloc_buffer(ipod, BUFFER_SIZE);
}
if(!m_blfile.isEmpty()) {
QString devicename = Utils::resolveDevicename(m_blfile);
if(devicename.isEmpty()) {