*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
- 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);
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);
-read_disk_block(struct boot_file_t *file, __u32 block, __u32 start,
- __u32 length, void *buf)
+read_disk_block(struct boot_file_t *file, uint64_t block, int start,
+ int length, void *buf)
- DEBUG_F("Reading %u bytes, starting at block %u, disk offset %Lu\n",
+ DEBUG_F("Reading %d bytes, starting at block %Lu, disk offset %Lu\n",
length, block, pos);
if (!prom_lseek(file->of_device, pos)) {
DEBUG_F("prom_lseek failed\n");
length, block, pos);
if (!prom_lseek(file->of_device, pos)) {
DEBUG_F("prom_lseek failed\n");
toread = (endofcur >= endpos)
? len : (endofcur - xfs_file->pos);
read_disk_block(xfs_file, fsb2daddr (xad->start),
toread = (endofcur >= endpos)
? len : (endofcur - xfs_file->pos);
read_disk_block(xfs_file, fsb2daddr (xad->start),