From dd0a571c496bbf5540e09749f41e6ca8b1e77478 Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Sat, 27 Feb 2010 11:27:13 +0000 Subject: 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 --- rbutil/rbutilqt/base/autodetection.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'rbutil/rbutilqt/base/autodetection.cpp') 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 { -- cgit v1.2.2