summaryrefslogtreecommitdiff
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.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()
52 } 52 }
53 } 53 }
54 } 54 }
55 55 int n;
56
56 //try ipodpatcher 57 //try ipodpatcher
57 struct ipod_t ipod; 58 struct ipod_t ipod;
58 59 n = ipod_scan(&ipod);
59 int n = ipod_scan(&ipod);
60 if(n == 1) { 60 if(n == 1) {
61 qDebug() << "Ipod found:" << ipod.modelstr << "at" << ipod.diskname; 61 qDebug() << "Ipod found:" << ipod.modelstr << "at" << ipod.diskname;
62 m_device = ipod.targetname; 62 m_device = ipod.targetname;
@@ -65,7 +65,14 @@ bool Autodetection::detect()
65 } 65 }
66 66
67 //try sansapatcher 67 //try sansapatcher
68 68 struct sansa_t sansa;
69 n = sansa_scan(&sansa);
70 if(n == 1) {
71 qDebug() << "Sansa found:" << "sansae200" << "at" << sansa.diskname;
72 m_device = "sansae200";
73 m_mountpoint = resolveMountPoint(sansa.diskname);
74 return true;
75 }
69 76
70 return false; 77 return false;
71} 78}
@@ -119,6 +126,7 @@ QString Autodetection::resolveMountPoint(QString device)
119 QString directory = dir; 126 QString directory = dir;
120 free( dev ); 127 free( dev );
121 free( dir ); 128 free( dir );
129 fclose(fp);
122 return directory; 130 return directory;
123 } 131 }
124 free( dev ); 132 free( dev );