X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Ffile.c;h=b5763a235f6d5db62ad5fb1b4c92254b89775270;hp=0278dfaed5302d52050f8da097d0fccbf291c8d5;hb=e80797f9e8b7a05aeb239ca9087ba57e7641a231;hpb=2ad0d7649e5042cad43a16b4a03bf53f39948316;ds=sidebyside diff --git a/second/file.c b/second/file.c index 0278dfa..b5763a2 100644 --- a/second/file.c +++ b/second/file.c @@ -1,7 +1,7 @@ /* * file.c - Filesystem related interfaces * - * Copyright (C) 2001 Ethan Benson + * Copyright (C) 2001, 2002 Ethan Benson * * parse_device_path() * @@ -166,8 +166,12 @@ file_block_open( struct boot_file_t* file, p->part_number, p->part_start, p->part_size ); if (partition == -1) { file->fs = fs_open( file, dev_name, p, file_name ); - if (file->fs != NULL) - goto bail; + if (file->fs == NULL || fserrorno != FILE_ERR_OK) + continue; + else { + partition = p->part_number; + goto done; + } } if ((partition >= 0) && (partition == p->part_number)) found = p; @@ -183,7 +187,7 @@ file_block_open( struct boot_file_t* file, DEBUG_F( "Using OF defaults.. (found = %p)\n", found ); file->fs = fs_open( file, dev_name, found, file_name ); -bail: +done: if (parts) partitions_free(parts);