From df3132e620bafdb8f2c816ac026a1d4230e14148 Mon Sep 17 00:00:00 2001 From: Mark Cave-Ayland Date: Sat, 3 Jul 2010 23:22:21 +0000 Subject: [PATCH] Fix a couple of incorrect error codes in hfsp_files_open(), and also revert the filesystem type return value to a cstr to maintain the existing API. Signed-off-by: Mark Cave-Ayland git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@811 f158a5a8-5612-0410-a976-696ce0be7e32 --- fs/hfsplus/hfsp_fs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/hfsplus/hfsp_fs.c b/fs/hfsplus/hfsp_fs.c index 440a588..45eb1a1 100644 --- a/fs/hfsplus/hfsp_fs.c +++ b/fs/hfsplus/hfsp_fs.c @@ -216,7 +216,7 @@ hfsp_files_open( hfsp_info_t *mi ) if (volume_open(mi->vol, fd)) { free( path ); close_io( fd ); - RET( -1 ); + RET( 0 ); } mi->hfspfile = malloc( sizeof(hfsp_file_t) ); @@ -244,7 +244,7 @@ hfsp_files_open( hfsp_info_t *mi ) if( !search_files(&(mi->hfspfile->rec), 0, match_path, path, mi->hfspfile ) ) RET ( -1 ); - RET ( 0 ); + RET ( -1 ); } /* ( -- ) */ @@ -383,11 +383,11 @@ hfsp_files_load( hfsp_info_t *mi ) RET ( act_count ); } -/* ( -- str len ) */ +/* ( -- cstr ) */ static void hfsp_files_get_fstype( hfsp_info_t *mi ) { - push_str("HFS+"); + PUSH( (ucell)strdup("HFS+") ); } /* ( -- cstr ) */