]> git.ozlabs.org Git - yaboot.git/blobdiff - second/fs_xfs.c
Fix typo in patch porting
[yaboot.git] / second / fs_xfs.c
index 9a2aaa6bd097bfcdf1a7fcdbba470bc3095cef53..04d6cf3a4db03943a444636abec51c27bc26c6d7 100644 (file)
@@ -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);