diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-02-27 11:27:13 +0000 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2010-02-27 11:27:13 +0000 |
commit | dd0a571c496bbf5540e09749f41e6ca8b1e77478 (patch) | |
tree | 8ab1d9f3efaa91f9d5bacb9b7ddf4266cf7a4dd1 /rbutil | |
parent | b21b0c872e2b9d3169eb0a4c3d57095cdf5b1b28 (diff) |
Use the data partition device node when trying to resolve the mountpoint.
The stricter matching for device nodes introduced with r24802 broke resolving
the mountpoint during autodetection as sansapatcher and ipodpatcher return the
device node of the player instead of its data partition.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24936 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r-- | rbutil/rbutilqt/base/autodetection.cpp | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/rbutil/rbutilqt/base/autodetection.cpp b/rbutil/rbutilqt/base/autodetection.cpp index bafa88d8bf..98d24c3369 100644 --- a/rbutil/rbutilqt/base/autodetection.cpp +++ b/rbutil/rbutilqt/base/autodetection.cpp @@ -179,7 +179,16 @@ bool Autodetection::detect() if(ipod.macpod) m_errdev = ipod.targetname; m_device = ipod.targetname; - m_mountpoint = resolveMountPoint(ipod.diskname); + // since resolveMountPoint is doing exact matches we need to select + // the correct partition. + QString mp(ipod.diskname); +#ifdef Q_OS_LINUX + mp.append("2"); +#endif +#ifdef Q_OS_MACX + mp.append("s2"); +#endif + m_mountpoint = resolveMountPoint(mp); return true; } else { @@ -197,7 +206,14 @@ bool Autodetection::detect() if(n == 1) { qDebug() << "[Autodetect] Sansa found:" << sansa.targetname << "at" << sansa.diskname; m_device = QString("sansa%1").arg(sansa.targetname); - m_mountpoint = resolveMountPoint(sansa.diskname); + QString mp(sansa.diskname); +#ifdef Q_OS_LINUX + mp.append("1"); +#endif +#ifdef Q_OS_MACX + mp.append("s1"); +#endif + m_mountpoint = resolveMountPoint(mp); return true; } else { |