summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2009-11-22 21:03:07 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2009-11-22 21:03:07 +0000
commit46e56582b02f833983c7c9244f3b597424089559 (patch)
tree52e1704a73b0f35f32f3a72d819f7dba93f7a60a /rbutil/rbutilqt
parent628cbae4edabfe961e0540fef19054499372417c (diff)
downloadrockbox-46e56582b02f833983c7c9244f3b597424089559.tar.gz
rockbox-46e56582b02f833983c7c9244f3b597424089559.zip
Fix Sansa bootloader installation on OS X.
- adjust the regex to figure the correct drive from the partition name. - move the check for an old bootloader into the first installation step -- it's a fatal problem so it should appear as soon as possible. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23715 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil/rbutilqt')
-rw-r--r--rbutil/rbutilqt/base/bootloaderinstallsansa.cpp22
1 files changed, 12 insertions, 10 deletions
diff --git a/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp b/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
index 43404de4bb..e57a7f9c24 100644
--- a/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
+++ b/rbutil/rbutilqt/base/bootloaderinstallsansa.cpp
@@ -75,6 +75,15 @@ bool BootloaderInstallSansa::install(void)
75 emit done(true); 75 emit done(true);
76 return false; 76 return false;
77 } 77 }
78 if(sansa.hasoldbootloader) {
79 emit logItem(tr("OLD ROCKBOX INSTALLATION DETECTED, ABORTING.\n"
80 "You must reinstall the original Sansa firmware before running\n"
81 "sansapatcher for the first time.\n"
82 "See http://www.rockbox.org/wiki/SansaE200Install\n"),
83 LOGERROR);
84 emit done(true);
85 return false;
86 }
78 emit logItem(tr("Downloading bootloader file"), LOGINFO); 87 emit logItem(tr("Downloading bootloader file"), LOGINFO);
79 88
80 downloadBlStart(m_blurl); 89 downloadBlStart(m_blurl);
@@ -96,16 +105,6 @@ void BootloaderInstallSansa::installStage2(void)
96 return; 105 return;
97 } 106 }
98 107
99 if(sansa.hasoldbootloader) {
100 emit logItem(tr("OLD ROCKBOX INSTALLATION DETECTED, ABORTING.\n"
101 "You must reinstall the original Sansa firmware before running\n"
102 "sansapatcher for the first time.\n"
103 "See http://www.rockbox.org/wiki/SansaE200Install\n"),
104 LOGERROR);
105 emit done(true);
106 return;
107 }
108
109 if(sansa_reopen_rw(&sansa) < 0) { 108 if(sansa_reopen_rw(&sansa) < 0) {
110 emit logItem(tr("Could not open Sansa in R/W mode"), LOGERROR); 109 emit logItem(tr("Could not open Sansa in R/W mode"), LOGERROR);
111 emit done(true); 110 emit done(true);
@@ -226,6 +225,9 @@ bool BootloaderInstallSansa::sansaInitialize(struct sansa_t *sansa)
226#if defined(Q_OS_WIN32) 225#if defined(Q_OS_WIN32)
227 sprintf(sansa->diskname, "\\\\.\\PhysicalDrive%i", 226 sprintf(sansa->diskname, "\\\\.\\PhysicalDrive%i",
228 Autodetection::resolveDevicename(m_blfile).toInt()); 227 Autodetection::resolveDevicename(m_blfile).toInt());
228#elif defined(Q_OS_MACX)
229 sprintf(sansa->diskname,
230 qPrintable(Autodetection::resolveDevicename(m_blfile).remove(QRegExp("s[0-9]+$"))));
229#else 231#else
230 sprintf(sansa->diskname, 232 sprintf(sansa->diskname,
231 qPrintable(Autodetection::resolveDevicename(m_blfile).remove(QRegExp("[0-9]+$")))); 233 qPrintable(Autodetection::resolveDevicename(m_blfile).remove(QRegExp("[0-9]+$"))));