]> git.ozlabs.org Git - yaboot.git/blobdiff - second/file.c
Fix botched IBM patch (multiple partition handling on rs6k)
[yaboot.git] / second / file.c
index da66de6a121df892424c2b04394611ad78d73fba..b5763a235f6d5db62ad5fb1b4c92254b89775270 100644 (file)
@@ -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 );
                  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 != FILE_ERR_OK)
-                   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;
          }
          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 );
 
      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);
 
      if (parts)
          partitions_free(parts);