X-Git-Url: http://git.ozlabs.org/?p=yaboot.git;a=blobdiff_plain;f=second%2Ffs_xfs.c;h=04d6cf3a4db03943a444636abec51c27bc26c6d7;hp=9a2aaa6bd097bfcdf1a7fcdbba470bc3095cef53;hb=082b8310e3f92ea8da0b7011549bd86c9fd4ce95;hpb=afaf577190536fe8e15fb5b2ed8372dbda82e7b1 diff --git a/second/fs_xfs.c b/second/fs_xfs.c index 9a2aaa6..04d6cf3 100644 --- a/second/fs_xfs.c +++ b/second/fs_xfs.c @@ -30,6 +30,7 @@ #include "xfs/xfs.h" #include "errors.h" #include "debug.h" +#include "bootinfo.h" #define SECTOR_BITS 9 @@ -77,7 +78,9 @@ xfs_open(struct boot_file_t *file, const char *dev_name, else 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 */ DEBUG_F("Trying to open dev_name=%s; filename=%s; partition offset=%Lu\n", buffer, file_name, partition_offset); file->of_device = prom_open(buffer);