diff --git a/lib/gtfpga.c b/lib/gtfpga.c index 72dbc5cc4..0ea4c721e 100644 --- a/lib/gtfpga.c +++ b/lib/gtfpga.c @@ -129,7 +129,7 @@ static int gtfpga_load_driver(struct pci_dev *d) if (!f) serror("Failed to add PCI id to uio_pci_generic driver"); - debug(5, "Adding ID to uio_pci_generic module: %04x %04x", d->vendor_id, d->device_id); + debug(DBG_GTFPGA | 5, "Adding ID to uio_pci_generic module: %04x %04x", d->vendor_id, d->device_id); fprintf(f, "%04x %04x", d->vendor_id, d->device_id); fclose(f); @@ -138,7 +138,7 @@ static int gtfpga_load_driver(struct pci_dev *d) if (!f) serror("Failed to add PCI id to uio_pci_generic driver"); - debug(5, "Bind slot to uio_pci_generic module: %s", slot); + debug(DBG_GTFPGA | 5, "Bind slot to uio_pci_generic module: %s", slot); fprintf(f, "%s\n", slot); fclose(f); @@ -168,7 +168,7 @@ static int gtfpga_mmap(struct gtfpga *g) int size = g->dev->size[GTFPGA_BAR]; /* mmap() first BAR */ - debug(5, "Setup mapping: mmap(NULL, %#x, PROT_READ | PROT_WRITE, MAP_SHARED, %u, %#lx)", size, fd, addr); + debug(DBG_GTFPGA | 5, "Setup mapping: mmap(NULL, %#x, PROT_READ | PROT_WRITE, MAP_SHARED, %u, %#lx)", size, fd, addr); void *map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, addr); if (map == MAP_FAILED) serror("Failed mmap()"); diff --git a/lib/opal.c b/lib/opal.c index d6a268384..54087534c 100644 --- a/lib/opal.c +++ b/lib/opal.c @@ -88,7 +88,7 @@ int opal_deinit() if (err != EOK) error("Failed to close shared memory area (%d)", err); - debug(4, "Closing OPAL shared memory mapping"); + debug(DBG_OPAL | 4, "Closing OPAL shared memory mapping"); err = OpalSystemCtrl_UnRegister(print_shmem_name); if (err != EOK) @@ -104,7 +104,7 @@ int opal_deinit() int opal_print_global() { - debug(2, "Controller ID: %u", params.controllerID); + debug(DBG_OPAL | 2, "Controller ID: %u", params.controllerID); char *sbuf = alloc(send_icons * 5); char *rbuf = alloc(recv_icons * 5); @@ -114,17 +114,17 @@ int opal_print_global() for (int i = 0; i < recv_icons; i++) strcatf(&rbuf, "%u ", recv_ids[i]); - debug(2, "Send Blocks: %s", sbuf); - debug(2, "Receive Blocks: %s", rbuf); + debug(DBG_OPAL | 2, "Send Blocks: %s", sbuf); + debug(DBG_OPAL | 2, "Receive Blocks: %s", rbuf); free(sbuf); free(rbuf); - debug(2, "Control Block Parameters:"); + debug(DBG_OPAL | 2, "Control Block Parameters:"); for (int i = 0; i < GENASYNC_NB_FLOAT_PARAM; i++) - debug(2, "FloatParam[]%u] = %f", i, params.FloatParam[i]); + debug(DBG_OPAL | 2, "FloatParam[]%u] = %f", i, params.FloatParam[i]); for (int i = 0; i < GENASYNC_NB_STRING_PARAM; i++) - debug(2, "StringParam[%u] = %s", i, params.StringParam[i]); + debug(DBG_OPAL | 2, "StringParam[%u] = %s", i, params.StringParam[i]); return 0; }