[OpenBIOS] [PATCH 1/2] iso9660: Fix Forth return value for iso9660_files_open()

Andreas Färber andreas.faerber at web.de
Sun Sep 26 23:01:05 CEST 2010


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 at siriusit.co.uk>
Signed-off-by: Andreas Färber <andreas.faerber at web.de>
---
 fs/iso9660/iso9660_fs.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/iso9660/iso9660_fs.c b/fs/iso9660/iso9660_fs.c
index 5714d6d..3fb5c16 100644
--- a/fs/iso9660/iso9660_fs.c
+++ b/fs/iso9660/iso9660_fs.c
@@ -49,7 +49,7 @@ iso9660_files_open( iso9660_info_t *mi )
 	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_files_open( iso9660_info_t *mi )
 			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 );
-- 
1.7.3




More information about the OpenBIOS mailing list