From c9a806b050bec45d91439b6d1aa03b59c476cfb6 Mon Sep 17 00:00:00 2001 From: Tony Breeds Date: Thu, 22 Oct 2009 16:20:47 +1100 Subject: [PATCH] Do not of_open() LINUX_NATIVE partitions. 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 --- second/fs_of.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/second/fs_of.c b/second/fs_of.c index bd481e4..2e5feb9 100644 --- a/second/fs_of.c +++ b/second/fs_of.c @@ -92,8 +92,9 @@ of_open(struct boot_file_t* file, 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; } -- 2.39.2