Exemplo n.º 1
0
/* Hack... otherwise you get internal compiler errors when optimizing on
    gcc2.7.2 on RISC OS */
static void gcr_data_writeback2(BYTE *buffer, BYTE *offset, unsigned int track,
                                unsigned int sector, drive_t *drive)
{
    int rc;

    gcr_convert_GCR_to_sector(buffer, offset,
                              drive->GCR_track_start_ptr,
                              drive->GCR_current_track_size);
    if (buffer[0] != 0x7) {
        log_error(drive->log,
                  "Could not find data block id of T:%d S:%d.",
                  track, sector);
    } else {
        rc = disk_image_write_sector(drive->image, buffer + 1, track, sector);
        if (rc < 0)
            log_error(drive->log,
                      "Could not update T:%d S:%d.", track, sector);
    }
}
Exemplo n.º 2
0
/* Hack... otherwise you get internal compiler errors when optimizing on
    gcc2.7.2 on RISC OS */
static void gcr_data_writeback2(BYTE *buffer, BYTE *offset, unsigned int track, unsigned int sector, drive_t *drive)
{
	int rc;

	gcr_convert_GCR_to_sector(buffer, offset,
			drive->GCR_track_start_ptr,
			drive->GCR_current_track_size);

	if (buffer[0] != 0x7)
	{
		#ifdef CELL_DEBUG
		printf("ERROR: Could not find data block id of T:%d S:%d.\n", track, sector);
		#endif
	}
	else
	{
		rc = disk_image_write_sector(drive->image, buffer + 1, track, sector);

		#ifdef CELL_DEBUG
		if (rc < 0)
			printf("ERROR: Could not update T:%d S:%d.\n", track, sector);
		#endif
	}
}