From 22056a9c37a599f5970ec1faccf77a8d295020cb Mon Sep 17 00:00:00 2001 From: Dominik Riebeling Date: Thu, 11 Feb 2010 22:19:34 +0000 Subject: Don't close the disk handle to the ipod too early. ipodInitialize() is not supposed to close but only to open the disk handle. Fixes a segfault when trying to install the ipod bootloader on windows. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24608 a1c6a512-1295-4272-9138-f99709370657 --- rbutil/rbutilqt/base/bootloaderinstallipod.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rbutil/rbutilqt/base/bootloaderinstallipod.cpp b/rbutil/rbutilqt/base/bootloaderinstallipod.cpp index 48b35f930f..e1d9f1324f 100644 --- a/rbutil/rbutilqt/base/bootloaderinstallipod.cpp +++ b/rbutil/rbutilqt/base/bootloaderinstallipod.cpp @@ -220,6 +220,9 @@ BootloaderInstallBase::Capabilities BootloaderInstallIpod::capabilities(void) } +/** @initialize Ipod by opening its file handle and checking if its an ipod. + * Note: the caller has to make sure the file handle gets closed! + */ bool BootloaderInstallIpod::ipodInitialize(struct ipod_t *ipod) { if(!m_blfile.isEmpty()) { @@ -264,7 +267,6 @@ bool BootloaderInstallIpod::ipodInitialize(struct ipod_t *ipod) return false; } read_directory(ipod); - ipod_close(ipod); return true; } -- cgit v1.2.3