summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-08-09 10:57:33 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-08-09 10:57:33 +0000
commit63ba647ee0fcdcb42f1e36e4a8f82c6c40cbb8f2 (patch)
treeb13d4c5767f8b084d78cc0598cc4abe4cdc8a6ea /rbutil/rbutilqt/base
parent7aaa544f09ae2f2cf0cd64cbd3f72c0714a94eba (diff)
downloadrockbox-63ba647ee0fcdcb42f1e36e4a8f82c6c40cbb8f2.tar.gz
rockbox-63ba647ee0fcdcb42f1e36e4a8f82c6c40cbb8f2.zip
Clean up bootloader installation debug output a bit.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22219 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt/base')
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallbase.cpp16
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallbase.h7
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallfile.cpp12
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallhex.cpp6
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallipod.cpp11
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallmi4.cpp18
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallsansa.cpp5
7 files changed, 40 insertions, 35 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp
index 428283749d..54e06d024e 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallbase.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallbase.cpp
@@ -50,8 +50,8 @@ void BootloaderInstallBase::downloadBlStart(QUrl source)
void BootloaderInstallBase::downloadReqFinished(int id, bool error)
{
- qDebug() << __FILE__ << "::" << __func__ << id << error;
- qDebug() << "error:" << m_http.errorString();
+ qDebug() << "[BootloaderInstallBase] Download Request" << id
+ << "finished, error:" << m_http.errorString();
downloadBlFinish(error);
}
@@ -59,7 +59,8 @@ void BootloaderInstallBase::downloadReqFinished(int id, bool error)
void BootloaderInstallBase::downloadBlFinish(bool error)
{
- qDebug() << __FILE__ << "::" << __func__ << ": error =" << error;
+ qDebug() << "[BootloaderInstallBase] Downloading bootloader finished, error:"
+ << error;
// update progress bar
emit logProgress(100, 100);
@@ -88,7 +89,7 @@ void BootloaderInstallBase::downloadBlFinish(bool error)
void BootloaderInstallBase::installBlfile(void)
{
- qDebug() << __FILE__ << __func__;
+ qDebug() << "[BootloaderInstallBase]" << __func__;
}
@@ -98,7 +99,7 @@ void BootloaderInstallBase::installBlfile(void)
bool BootloaderInstallBase::backup(QString to)
{
- qDebug() << __func__;
+ qDebug() << "[BootloaderInstallBase] Backing up bootloader file";
QDir targetDir(".");
emit logItem(tr("Creating backup of original firmware file."), LOGINFO);
if(!targetDir.mkpath(to)) {
@@ -106,7 +107,7 @@ bool BootloaderInstallBase::backup(QString to)
return false;
}
QString tofile = to + "/" + QFileInfo(m_blfile).fileName();
- qDebug() << "trying to backup" << m_blfile << "to" << tofile;
+ qDebug() << "[BootloaderInstallBase] trying to backup" << m_blfile << "to" << tofile;
if(!QFile::copy(resolvePathCase(m_blfile), tofile)) {
emit logItem(tr("Creating backup copy failed."), LOGERROR);
return false;
@@ -128,7 +129,8 @@ int BootloaderInstallBase::logInstall(LogMode mode)
if(mode == LogAdd) {
s.setValue("Bootloader/" + section, m_blversion.toString(Qt::ISODate));
- qDebug() << m_blversion.toString(Qt::ISODate);
+ qDebug() << "[BootloaderInstallBase] Writing log, version:"
+ << m_blversion.toString(Qt::ISODate);
}
else {
s.remove("Bootloader/" + section);
diff --git a/rbutil/rbutilqt/base/bootloaderinstallbase.h b/rbutil/rbutilqt/base/bootloaderinstallbase.h
index 470a23a7ab..1e342e045b 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallbase.h
+++ b/rbutil/rbutilqt/base/bootloaderinstallbase.h
@@ -49,7 +49,7 @@ class BootloaderInstallBase : public QObject
virtual BootloaderType installed(void)=0;
//! returns the capabilities of the bootloader class
virtual Capabilities capabilities(void)=0;
- //! returns a OF Firmware hint or empty if there is none
+ //! returns a OF Firmware hint or empty if there is none
virtual QString ofHint() {return QString();}
@@ -66,8 +66,9 @@ class BootloaderInstallBase : public QObject
void setOfFile(QString f)
{m_offile = f;}
- //! returns a port Install Hint or empty if there is none
- //! static and in the base class, so the installer classes dont need to be modified for new targets
+ //! returns a port Install Hint or empty if there is none
+ //! static and in the base class, so the installer classes dont need to
+ // be modified for new targets
static QString postinstallHints(QString model);
protected slots:
diff --git a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp
index 0c12b05253..0db39a5be3 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallfile.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallfile.cpp
@@ -33,7 +33,7 @@ BootloaderInstallFile::BootloaderInstallFile(QObject *parent)
bool BootloaderInstallFile::install(void)
{
emit logItem(tr("Downloading bootloader"), LOGINFO);
- qDebug() << __func__;
+ qDebug() << "[BootloaderInstallFile] installing bootloader";
downloadBlStart(m_blurl);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
return true;
@@ -48,7 +48,7 @@ void BootloaderInstallFile::installStage2(void)
QString fwfile(resolvePathCase(m_blfile));
if(!fwfile.isEmpty()) {
QString moved = resolvePathCase(m_blfile) + ".ORIG";
- qDebug() << "renaming" << fwfile << "->" << moved;
+ qDebug() << "[BootloaderInstallFile] renaming" << fwfile << "to" << moved;
QFile::rename(fwfile, moved);
}
@@ -82,7 +82,7 @@ void BootloaderInstallFile::installStage2(void)
// place (new) bootloader
m_tempfile.open();
- qDebug() << "renaming" << m_tempfile.fileName() << "->" << fwfile;
+ qDebug() << "[BootloaderInstallFile] renaming" << m_tempfile.fileName() << "to" << fwfile;
m_tempfile.close();
m_tempfile.rename(fwfile);
@@ -95,7 +95,7 @@ void BootloaderInstallFile::installStage2(void)
bool BootloaderInstallFile::uninstall(void)
{
- qDebug() << __func__;
+ qDebug() << "[BootloaderInstallFile] Uninstalling bootloader";
emit logItem(tr("Removing Rockbox bootloader"), LOGINFO);
// check if a .ORIG file is present, and allow moving it back.
QString origbl = resolvePathCase(m_blfile + ".ORIG");
@@ -127,7 +127,7 @@ bool BootloaderInstallFile::uninstall(void)
//! @return BootloaderRockbox, BootloaderOther or BootloaderUnknown.
BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void)
{
- qDebug("%s()", __func__);
+ qDebug() << "[BootloaderInstallFile] checking installed bootloader";
if(!resolvePathCase(m_blfile).isEmpty()
&& !resolvePathCase(m_blfile + ".ORIG").isEmpty())
return BootloaderRockbox;
@@ -140,7 +140,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallFile::installed(void)
BootloaderInstallBase::Capabilities BootloaderInstallFile::capabilities(void)
{
- qDebug() << __func__;
+ qDebug() << "[BootloaderInstallFile] getting capabilities";
return Install | IsFile | CanCheckInstalled | Backup;
}
diff --git a/rbutil/rbutilqt/base/bootloaderinstallhex.cpp b/rbutil/rbutilqt/base/bootloaderinstallhex.cpp
index 31659981f7..994a7cb16f 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallhex.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallhex.cpp
@@ -74,7 +74,7 @@ bool BootloaderInstallHex::install(void)
file.close();
QString hash = QCryptographicHash::hash(filedata,
QCryptographicHash::Md5).toHex();
- qDebug() << "hexfile hash:" << hash;
+ qDebug() << "[BootloaderInstallHex] hexfile hash:" << hash;
if(file.error() != QFile::NoError) {
emit logItem(tr("Could not verify original firmware file"), LOGERROR);
emit done(true);
@@ -112,7 +112,7 @@ bool BootloaderInstallHex::install(void)
int result;
result = iriver_decode(m_offile.toAscii().data(),
m_descrambled.fileName().toAscii().data(), FALSE, STRIP_NONE);
- qDebug() << "iriver_decode" << result;
+ qDebug() << "[BootloaderInstallHex] iriver_decode" << result;
if(result < 0) {
emit logItem(tr("Error in descramble: %1").arg(scrambleError(result)), LOGERROR);
@@ -200,7 +200,7 @@ void BootloaderInstallHex::installStage2(void)
targethex.close();
QString hash = QCryptographicHash::hash(filedata,
QCryptographicHash::Md5).toHex();
- qDebug() << "created hexfile hash:" << hash;
+ qDebug() << "[BootloaderInstallHex] created hexfile hash:" << hash;
emit logItem(tr("Checking modified firmware file"), LOGINFO);
if(hash != QString(md5sums[m_hashindex].patched)) {
diff --git a/rbutil/rbutilqt/base/bootloaderinstallipod.cpp b/rbutil/rbutilqt/base/bootloaderinstallipod.cpp
index f622225f22..ca243a944c 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallipod.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallipod.cpp
@@ -140,7 +140,7 @@ void BootloaderInstallIpod::installStage2(void)
emit done(true);
return;
}
- qDebug() << "version installed:" << m_blversion.toString(Qt::ISODate);
+ qDebug() << "[BootloaderInstallIpod] version installed:" << m_blversion.toString(Qt::ISODate);
}
@@ -203,17 +203,17 @@ BootloaderInstallBase::BootloaderType BootloaderInstallIpod::installed(void)
BootloaderInstallBase::BootloaderType result = BootloaderRockbox;
if(!ipodInitialize(&ipod)) {
- qDebug() << "BootloaderInstallIpod::installed(): BootloaderUnknown";
+ qDebug() << "[BootloaderInstallIpod] installed: BootloaderUnknown";
result = BootloaderUnknown;
}
else {
read_directory(&ipod);
if(ipod.ipod_directory[0].entryOffset == 0) {
- qDebug() << "BootloaderInstallIpod::installed(): BootloaderOther";
+ qDebug() << "[BootloaderInstallIpod] installed: BootloaderOther";
result = BootloaderOther;
}
else {
- qDebug() << "BootloaderInstallIpod::installed(): BootloaderRockbox";
+ qDebug() << "[BootloaderInstallIpod] installed: BootloaderRockbox";
}
}
ipod_close(&ipod);
@@ -243,7 +243,8 @@ bool BootloaderInstallIpod::ipodInitialize(struct ipod_t *ipod)
qPrintable(Autodetection::resolveDevicename(m_blfile)
.remove(QRegExp("[0-9]+$"))));
#endif
- qDebug() << "ipodpatcher: overriding scan, using" << ipod->diskname;
+ qDebug() << "[BootloaderInstallIpod] ipodpatcher: overriding scan, using"
+ << ipod->diskname;
}
else {
ipod_scan(ipod);
diff --git a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp
index 0b42425903..8ae872d5ab 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallmi4.cpp
@@ -32,7 +32,7 @@ BootloaderInstallMi4::BootloaderInstallMi4(QObject *parent)
bool BootloaderInstallMi4::install(void)
{
emit logItem(tr("Downloading bootloader"), LOGINFO);
- qDebug() << __func__;
+ qDebug() << "[BootloaderInstallMi4] installing bootloader";
downloadBlStart(m_blurl);
connect(this, SIGNAL(downloadDone()), this, SLOT(installStage2()));
return true;
@@ -49,17 +49,17 @@ void BootloaderInstallMi4::installStage2(void)
QString moved = QFileInfo(resolvePathCase(m_blfile)).absolutePath()
+ "/OF.mi4";
if(!QFileInfo(moved).exists()) {
- qDebug() << "renaming" << fwfile << "->" << moved;
+ qDebug() << "[BootloaderInstallMi4] renaming" << fwfile << "to" << moved;
oldbl.rename(moved);
}
else {
- qDebug() << "OF.mi4 already present, not renaming again.";
+ qDebug() << "[BootloaderInstallMi4] OF.mi4 already present, not renaming again.";
oldbl.remove();
}
// place new bootloader
m_tempfile.open();
- qDebug() << "renaming" << m_tempfile.fileName() << "->" << fwfile;
+ qDebug() << "[BootloaderInstallMi4] renaming" << m_tempfile.fileName() << "to" << fwfile;
m_tempfile.close();
m_tempfile.rename(fwfile);
@@ -72,7 +72,7 @@ void BootloaderInstallMi4::installStage2(void)
bool BootloaderInstallMi4::uninstall(void)
{
- qDebug() << __func__;
+ qDebug() << "[BootloaderInstallMi4] Uninstalling bootloader";
// check if it's actually a Rockbox bootloader
emit logItem(tr("Checking for Rockbox bootloader"), LOGINFO);
@@ -117,7 +117,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallMi4::installed(void)
QString resolved;
resolved = resolvePathCase(m_blfile);
if(resolved.isEmpty()) {
- qDebug("%s: BootloaderNone", __func__);
+ qDebug() << "[BootloaderInstallMi4] installed: BootloaderNone";
return BootloaderNone;
}
@@ -129,11 +129,11 @@ BootloaderInstallBase::BootloaderType BootloaderInstallMi4::installed(void)
f.close();
if(!memcmp(magic, "RBBL", 4)) {
- qDebug("%s: BootloaderRockbox", __func__);
+ qDebug() << "[BootloaderInstallMi4] installed: BootloaderRockbox";
return BootloaderRockbox;
}
else {
- qDebug("%s: BootloaderOther", __func__);
+ qDebug() << "[BootloaderInstallMi4] installed: BootloaderOther";
return BootloaderOther;
}
}
@@ -141,7 +141,7 @@ BootloaderInstallBase::BootloaderType BootloaderInstallMi4::installed(void)
BootloaderInstallBase::Capabilities BootloaderInstallMi4::capabilities(void)
{
- qDebug() << __func__;
+ qDebug() << "[BootloaderInstallMi4] getting capabilities";
return Install | Uninstall | Backup | IsFile | CanCheckInstalled | CanCheckVersion;
}
diff --git a/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp b/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
index 19750446f6..43404de4bb 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
@@ -125,7 +125,7 @@ void BootloaderInstallSansa::installStage2(void)
m_tempfile.close();
if(memcmp(sansa.targetname, magic, 4) != 0) {
emit logItem(tr("Bootloader mismatch! Aborting."), LOGERROR);
- qDebug("[BL-Sansa] Targetname: %s, mi4 magic: %c%c%c%c",
+ qDebug("[BootloaderInstallSansa] Targetname: %s, mi4 magic: %c%c%c%c",
sansa.targetname, magic[0], magic[1], magic[2], magic[3]);
emit done(true);
sansa_close(&sansa);
@@ -230,7 +230,8 @@ bool BootloaderInstallSansa::sansaInitialize(struct sansa_t *sansa)
sprintf(sansa->diskname,
qPrintable(Autodetection::resolveDevicename(m_blfile).remove(QRegExp("[0-9]+$"))));
#endif
- qDebug() << "sansapatcher: overriding scan, using" << sansa->diskname;
+ qDebug() << "[BootloaderInstallSansa] sansapatcher: overriding scan, using"
+ << sansa->diskname;
}
else if(sansa_scan(sansa) != 1) {
emit logItem(tr("Can't find Sansa"), LOGERROR);