diff options
Diffstat (limited to 'radeontool.c')
-rw-r--r-- | radeontool.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/radeontool.c b/radeontool.c index 25343b3..d259254 100644 --- a/radeontool.c +++ b/radeontool.c @@ -37,9 +37,9 @@ int ctrl_region = -1, fb_region = -1; unsigned char * volatile fb_mem; unsigned char * volatile ctrl_mem; static void radeon_rom_legacy_mmio_table(unsigned char *bios, int offset); -static void fatal(char *why) +static void die(const char *why) { - fprintf(stderr, "fatal error: %s", why); + fprintf(stderr, "fatal error: %s\n", why); pci_system_cleanup(); exit(-1); } @@ -920,7 +920,7 @@ static void map_radeon_cntl_mem(void) int i = 0; if (pci_system_init() != 0) - fatal("failed to initialise libpciaccess\n"); + die("failed to initialise libpciaccess"); match.domain = PCI_MATCH_ANY; match.bus = PCI_MATCH_ANY; @@ -946,28 +946,28 @@ static void map_radeon_cntl_mem(void) if (device->regions[i].size >= 16 * 1024 && device->regions[i].size <= 64 * 1024) { if (ctrl_region != -1) - fatal("cannot distinguish ctrl region\n"); + die("cannot distinguish ctrl region"); ctrl_region = i; } else if (device->regions[i].size >= 64 * 1024 * 1024) { if (fb_region != -1) - fatal("cannot distinguish fb region\n"); + die("cannot distinguish fb region"); fb_region = i; } } if (ctrl_region == -1) - fatal("cannot find ctrl region\n"); + die("cannot find ctrl region"); if (fb_region == -1) - fatal("cannot find fb region\n"); + die("cannot find fb region"); avivo_device = device; break; } } if (!avivo_device) - fatal("cannot find Radeon device\n"); + die("cannot find Radeon device"); if (pci_device_map_region(avivo_device, ctrl_region, 1) != 0) - fatal("mapping ctrl region\n"); + die("mapping ctrl region"); ctrl_mem = avivo_device->regions[ctrl_region].memory; if (pci_device_map_region(avivo_device, fb_region, 1) == 0) @@ -2879,7 +2879,7 @@ void radeon_rom_tables(const char * file) close(fd); if (bios[0] != 0x55 || bios[1] != 0xaa) - fatal("PCI ROM signature 0x55 0xaa missing\n"); + die("PCI ROM signature 0x55 0xaa missing"); hdr = BIOS16(0x48); printf("\nBIOS Tables:\n------------\n\n"); printf("Header at %x, type: %d [%s]\n", hdr, BIOS8(hdr), |