summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-23 22:07:21 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2007-08-23 22:07:21 +0000
commit739949979c15517b00868ecf2c2044742890f485 (patch)
tree8d6dd8d73c35efd6d741d2f1abc9ae10fc968a3c
parentd23afdccbc3f821b9292e0168026cfce0d264027 (diff)
downloadrockbox-739949979c15517b00868ecf2c2044742890f485.tar.gz
rockbox-739949979c15517b00868ecf2c2044742890f485.tar.bz2
rockbox-739949979c15517b00868ecf2c2044742890f485.zip
Add (untested) device detection using sansapatcher.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14445 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--rbutil/rbutilqt/autodetection.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/autodetection.cpp b/rbutil/rbutilqt/autodetection.cpp
index e8eb498d62..7fe1a72692 100644
--- a/rbutil/rbutilqt/autodetection.cpp
+++ b/rbutil/rbutilqt/autodetection.cpp
@@ -52,11 +52,11 @@ bool Autodetection::detect()
}
}
}
-
+ int n;
+
//try ipodpatcher
struct ipod_t ipod;
-
- int n = ipod_scan(&ipod);
+ n = ipod_scan(&ipod);
if(n == 1) {
qDebug() << "Ipod found:" << ipod.modelstr << "at" << ipod.diskname;
m_device = ipod.targetname;
@@ -65,7 +65,14 @@ bool Autodetection::detect()
}
//try sansapatcher
-
+ struct sansa_t sansa;
+ n = sansa_scan(&sansa);
+ if(n == 1) {
+ qDebug() << "Sansa found:" << "sansae200" << "at" << sansa.diskname;
+ m_device = "sansae200";
+ m_mountpoint = resolveMountPoint(sansa.diskname);
+ return true;
+ }
return false;
}
@@ -119,6 +126,7 @@ QString Autodetection::resolveMountPoint(QString device)
QString directory = dir;
free( dev );
free( dir );
+ fclose(fp);
return directory;
}
free( dev );