Author: blueswirl Date: Tue Sep 28 20:59:41 2010 New Revision: 864 URL: http://tracker.coreboot.org/trac/openbios/changeset/864
Log: iso9660: Fix Forth return value for iso9660_files_open()
There's a mixup of 0 and -1. Don't return failure if iso9660_open() succeeded. Don't return success in case iso9660_open() or iso9660_mount() failed.
This resolves both a hang when trying to boot cd:,\:tbxi and failure to boot either cd:,\ppc\bootinfo.txt or cd:,\ppc\chrp\bootfile.exe despite present on the AIX 6.1 disk.
Cc: Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk Signed-off-by: Andreas Färber andreas.faerber@web.de Signed-off-by: Blue Swirl blauwirbel@gmail.com
Modified: trunk/openbios-devel/fs/iso9660/iso9660_fs.c
Modified: trunk/openbios-devel/fs/iso9660/iso9660_fs.c ============================================================================== --- trunk/openbios-devel/fs/iso9660/iso9660_fs.c Sat Sep 25 19:07:10 2010 (r863) +++ trunk/openbios-devel/fs/iso9660/iso9660_fs.c Tue Sep 28 20:59:41 2010 (r864) @@ -49,7 +49,7 @@ if ( mi->volume == NULL ) { free( path ); close_io( fd ); - RET( -1 ); + RET( 0 ); }
mi->common->dir = iso9660_opendir( mi->volume, path ); @@ -59,11 +59,11 @@ iso9660_umount( mi->volume ); close_io( fd ); free( path ); - RET( -1 ); + RET( 0 ); } mi->common->type = FILE; free( path ); - RET( 0 ); + RET( -1 ); } mi->common->type = DIR; free( path );