X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Ffs_ext2.c;h=d24450d5c92b5b0105a7597907b54ef2ee2f2fc5;hp=3240ce215ac802c6164f459f2f06df7e67c937d0;hb=a9e02f948a7e3f8ada87e07a0c1a382805ad15c6;hpb=3a57377b5279a98ad98ef4b535eb0516099bc737 diff --git a/second/fs_ext2.c b/second/fs_ext2.c index 3240ce2..d24450d 100644 --- a/second/fs_ext2.c +++ b/second/fs_ext2.c @@ -35,6 +35,7 @@ #include "fs.h" #include "errors.h" #include "debug.h" +#include "bootinfo.h" #define FAST_VERSION #define MAX_READ_RANGE 256 @@ -45,9 +46,8 @@ typedef int FILE; #include "ext2fs/ext2fs.h" static int ext2_open( struct boot_file_t* file, - const char* dev_name, struct partition_t* part, - const char* file_name); + struct boot_fspec_t* fspec); static int ext2_read( struct boot_file_t* file, unsigned int size, void* buffer); @@ -122,14 +122,15 @@ void com_err (const char *a, long i, const char *fmt,...) static int ext2_open( struct boot_file_t* file, - const char* dev_name, struct partition_t* part, - const char* file_name) + struct boot_fspec_t* fspec) { int result = 0; int error = FILE_ERR_NOTFOUND; static char buffer[1024]; int ofopened = 0; + char *dev_name = fspec->dev; + char *file_name = fspec->file; DEBUG_ENTER; DEBUG_OPEN; @@ -170,7 +171,8 @@ ext2_open( struct boot_file_t* file, /* Open the OF device for the entire disk */ strncpy(buffer, dev_name, 1020); - strcat(buffer, ":0"); + if (_machine != _MACH_bplan) + strcat(buffer, ":0"); DEBUG_F("<%s>\n", buffer);