diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-11-22 21:03:07 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2009-11-22 21:03:07 +0000 |
commit | 46e56582b02f833983c7c9244f3b597424089559 (patch) | |
tree | 52e1704a73b0f35f32f3a72d819f7dba93f7a60a /rbutil | |
parent | 628cbae4edabfe961e0540fef19054499372417c (diff) | |
download | rockbox-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')
-rw-r--r-- | rbutil/rbutilqt/base/bootloaderinstallsansa.cpp | 22 |
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) emit done(true); return false; } + if(sansa.hasoldbootloader) { + emit logItem(tr("OLD ROCKBOX INSTALLATION DETECTED, ABORTING.\n" + "You must reinstall the original Sansa firmware before running\n" + "sansapatcher for the first time.\n" + "See http://www.rockbox.org/wiki/SansaE200Install\n"), + LOGERROR); + emit done(true); + return false; + } emit logItem(tr("Downloading bootloader file"), LOGINFO); downloadBlStart(m_blurl); @@ -96,16 +105,6 @@ void BootloaderInstallSansa::installStage2(void) return; } - if(sansa.hasoldbootloader) { - emit logItem(tr("OLD ROCKBOX INSTALLATION DETECTED, ABORTING.\n" - "You must reinstall the original Sansa firmware before running\n" - "sansapatcher for the first time.\n" - "See http://www.rockbox.org/wiki/SansaE200Install\n"), - LOGERROR); - emit done(true); - return; - } - if(sansa_reopen_rw(&sansa) < 0) { emit logItem(tr("Could not open Sansa in R/W mode"), LOGERROR); emit done(true); @@ -226,6 +225,9 @@ bool BootloaderInstallSansa::sansaInitialize(struct sansa_t *sansa) #if defined(Q_OS_WIN32) sprintf(sansa->diskname, "\\\\.\\PhysicalDrive%i", Autodetection::resolveDevicename(m_blfile).toInt()); +#elif defined(Q_OS_MACX) + sprintf(sansa->diskname, + qPrintable(Autodetection::resolveDevicename(m_blfile).remove(QRegExp("s[0-9]+$")))); #else sprintf(sansa->diskname, qPrintable(Autodetection::resolveDevicename(m_blfile).remove(QRegExp("[0-9]+$")))); |