]> git.ozlabs.org Git - yaboot.git/commitdiff
Do not of_open() LINUX_NATIVE partitions.
authorTony Breeds <tony@bakeyournoodle.com>
Thu, 22 Oct 2009 05:20:47 +0000 (16:20 +1100)
committerTony Breeds <tony@bakeyournoodle.com>
Thu, 22 Oct 2009 05:20:47 +0000 (16:20 +1100)
If for some reason a partition is LINUX_NATIVE but is not handled by one
of the existing filesystem drivers, of_open() /may/ appear to succeed,
but infact the ihandle is garbage.

Make sure we skip LINUX_NATIVE partitions.

Signed-off-by: Tony Breeds <tony@bakeyournoodle.com>
second/fs_of.c

index bd481e43ed66007b2430f63348a029e519bf1d75..2e5feb92c57b3e89b364ad162cc69ea47b6d7467 100644 (file)
@@ -92,8 +92,9 @@ of_open(struct boot_file_t* file,
      strncpy(buffer, fspec->dev, 768);
      strcat(buffer, ":");
      if (part) {
      strncpy(buffer, fspec->dev, 768);
      strcat(buffer, ":");
      if (part) {
-          if (part->sys_ind == LINUX_RAID) {
-              DEBUG_F("skipping because partition is marked LINUX_RAID\n");
+          if (part->sys_ind == LINUX_RAID || part->sys_ind == LINUX_NATIVE) {
+              DEBUG_F("skipping because partition is tagged %08x\n",
+                       part->sys_ind  );
               DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
               return FILE_ERR_BAD_FSYS;
          }
               DEBUG_LEAVE(FILE_ERR_BAD_FSYS);
               return FILE_ERR_BAD_FSYS;
          }