summaryrefslogtreecommitdiffstats
path: root/rbutil/rbutilqt/base/autodetection.cpp
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2012-12-23 23:36:00 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2013-01-01 15:06:34 +0100
commit9c1ed84d28edfa4a2b5b0a327dccd83d1a1beef8 (patch)
tree1c884e4db52c2d365095c281e63956f909691226 /rbutil/rbutilqt/base/autodetection.cpp
parent24e37ddf57bac6a1c9786d50abbe3a1982930382 (diff)
downloadrockbox-9c1ed84d28edfa4a2b5b0a327dccd83d1a1beef8.tar.gz
rockbox-9c1ed84d28edfa4a2b5b0a327dccd83d1a1beef8.tar.bz2
rockbox-9c1ed84d28edfa4a2b5b0a327dccd83d1a1beef8.zip
sansapatcher: move sectorbuf pointer into sansa_t structure.
Similar as the ipod_t structure for ipodpatcher the sansa_t structure holds all relevant information for sansapatcher. Put the global sansa_sectorbuf pointer into it as well. Change-Id: Iad08ef6aafc49609c3d0d556914246f230ee0179
Diffstat (limited to 'rbutil/rbutilqt/base/autodetection.cpp')
-rw-r--r--rbutil/rbutilqt/base/autodetection.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/rbutil/rbutilqt/base/autodetection.cpp b/rbutil/rbutilqt/base/autodetection.cpp
index 8fba1d8cea..a453fa8d60 100644
--- a/rbutil/rbutilqt/base/autodetection.cpp
+++ b/rbutil/rbutilqt/base/autodetection.cpp
@@ -167,9 +167,8 @@ bool Autodetection::detect()
// try sansapatcher
// initialize sector buffer. Needed.
- sansa_sectorbuf = NULL;
- sansa_alloc_buffer(&sansa_sectorbuf, BUFFER_SIZE);
struct sansa_t sansa;
+ sansa_alloc_buffer(&sansa, BUFFER_SIZE);
n = sansa_scan(&sansa);
if(n == 1) {
qDebug() << "[Autodetect] Sansa found:" << sansa.targetname << "at" << sansa.diskname;
@@ -187,8 +186,8 @@ bool Autodetection::detect()
else {
qDebug() << "[Autodetect] sansapatcher: no Sansa found." << n;
}
- free(sansa_sectorbuf);
- sansa_sectorbuf = NULL;
+ free(sansa.sectorbuf);
+ sansa.sectorbuf = NULL;
if(m_mountpoint.isEmpty() && m_device.isEmpty()
&& m_errdev.isEmpty() && m_incompat.isEmpty())