diff --git a/rbutil/rbutilqt/base/bootloaderinstallams.cpp b/rbutil/rbutilqt/base/bootloaderinstallams.cpp index 132578bee7..051093eccc 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallams.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallams.cpp @@ -40,6 +40,8 @@ QString BootloaderInstallAms::ofHint() "manual and " "the SansaAMS " "wiki page on how to obtain this file.
" + "Note: This file is not present on your player and will " + "disappear automatically after installing it.

" "Press Ok to continue and browse your computer for the firmware " "file."); } @@ -48,22 +50,22 @@ bool BootloaderInstallAms::install(void) { if(m_offile.isEmpty()) return false; - + qDebug() << "[BootloaderInstallAms] installing bootloader"; - + // download firmware from server emit logItem(tr("Downloading bootloader file"), LOGINFO); - + connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2())); downloadBlStart(m_blurl); - + return true; } void BootloaderInstallAms::installStage2(void) -{ +{ qDebug() << "[BootloaderInstallAms] installStage2"; - + unsigned char* buf; unsigned char* of_packed; int of_packedsize; @@ -79,9 +81,9 @@ void BootloaderInstallAms::installStage2(void) int patchable; int totalsize; char errstr[200]; - - sum.md5 = md5sum; - + + sum.md5 = md5sum; + m_tempfile.open(); QString bootfile = m_tempfile.fileName(); m_tempfile.close(); @@ -91,14 +93,14 @@ void BootloaderInstallAms::installStage2(void) &bootloader_size,&rb_packedsize, errstr,sizeof(errstr)); if (rb_packed == NULL) - { + { qDebug() << "[BootloaderInstallAms] could not load bootloader: " << bootfile; emit logItem(errstr, LOGERROR); emit logItem(tr("Could not load %1").arg(bootfile), LOGERROR); emit done(true); return; } - + /* Load original firmware file */ buf = load_of_file(m_offile.toLocal8Bit().data(), model, &len, &sum, &firmware_size, &of_packed ,&of_packedsize, @@ -129,16 +131,16 @@ void BootloaderInstallAms::installStage2(void) emit done(true); return; } - + /* patch the firmware */ emit logItem(tr("Patching Firmware..."), LOGINFO); - + patch_firmware(sum.model,firmware_revision(sum.model),firmware_size,buf, len,of_packed,of_packedsize,rb_packed,rb_packedsize); /* write out file */ QFile out(m_blfile); - + if(!out.open(QIODevice::WriteOnly | QIODevice::Truncate)) { qDebug() << "[BootloaderInstallAms] Could not open" << m_blfile << "for writing"; @@ -149,7 +151,7 @@ void BootloaderInstallAms::installStage2(void) emit done(true); return; } - + n = out.write((char*)buf, len); if (n != len) @@ -164,11 +166,11 @@ void BootloaderInstallAms::installStage2(void) } out.close(); - + free(buf); free(of_packed); free(rb_packed); - + //end of install qDebug() << "[BootloaderInstallAms] install successfull"; emit logItem(tr("Success: modified firmware file created"), LOGINFO);