1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Dominik Riebeling 2010-02-11 22:19:34 +00:00
parent d868bfe521
commit 22056a9c37

View file

@ -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) bool BootloaderInstallIpod::ipodInitialize(struct ipod_t *ipod)
{ {
if(!m_blfile.isEmpty()) { if(!m_blfile.isEmpty()) {
@ -264,7 +267,6 @@ bool BootloaderInstallIpod::ipodInitialize(struct ipod_t *ipod)
return false; return false;
} }
read_directory(ipod); read_directory(ipod);
ipod_close(ipod);
return true; return true;
} }