X-Git-Url: https://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Ffs_reiserfs.c;h=238f523e843c848246522e064be08a402c4b6794;hp=4ad1c2ec176dbb9bb7495e9550e0d4312c40643e;hb=082b8310e3f92ea8da0b7011549bd86c9fd4ce95;hpb=afaf577190536fe8e15fb5b2ed8372dbda82e7b1 diff --git a/second/fs_reiserfs.c b/second/fs_reiserfs.c index 4ad1c2e..238f523 100644 --- a/second/fs_reiserfs.c +++ b/second/fs_reiserfs.c @@ -29,6 +29,7 @@ #include "fs.h" #include "errors.h" #include "debug.h" +#include "bootinfo.h" #include "reiserfs/reiserfs.h" /* Exported in struct fs_t */ @@ -84,7 +85,10 @@ reiserfs_open( struct boot_file_t *file, const char *dev_name, else INFO->partition_offset = 0; - sprintf( buffer, "%s:%d", dev_name, 0 ); /* 0 is full disk in OF */ + strncpy(buffer, dev_name, 1020); + if (_machine != _MACH_bplan) + strcat(buffer, ":0"); /* 0 is full disk in (non-buggy) OF */ + file->of_device = prom_open( buffer ); DEBUG_F( "Trying to open dev_name=%s; filename=%s; partition offset=%Lu\n", buffer, file_name, INFO->partition_offset );