1
0
Fork 0
forked from len0rd/rockbox

Move check for existing bootloader to ipodpatcher.

Bootloader handling is different on nano2g compared to the other supported Ipod
models. Since ipodpatcher handles this internally make ipodpatcher also provide
a way to check this when using from Rockbox Utility to avoid duplicating the
(already existing) checks in the latter.

Fixes wrong "bootloader already installed" message on nano2g.

Change-Id: Ibc658d775fbac7cf9a7e329d445fe97828a455d8
This commit is contained in:
Dominik Riebeling 2012-07-01 12:29:47 +02:00
parent d8f5a00fc1
commit bf1c491c2b
3 changed files with 27 additions and 24 deletions

View file

@ -166,7 +166,7 @@ bool BootloaderInstallIpod::uninstall(void)
return false;
}
if (ipod.ipod_directory[0].entryOffset == 0) {
if (ipod_has_bootloader(&ipod) == 0) {
emit logItem(tr("No bootloader detected."), LOGERROR);
emit done(true);
return false;
@ -199,8 +199,8 @@ BootloaderInstallBase::BootloaderType BootloaderInstallIpod::installed(void)
}
else {
read_directory(&ipod);
if(ipod.ipod_directory[0].entryOffset == 0 || ipod.macpod) {
qDebug() << "[BootloaderInstallIpod] installed: BootloaderOther";
getmodel(&ipod,(ipod.ipod_directory[ipod.ososimage].vers>>8));
if(!ipod_has_bootloader(&ipod)) {
result = BootloaderOther;
}
else {