diff options
author | Sean Nelson <audiohacked@gmail.com> | 2010-05-07 20:09:04 +0000 |
---|---|---|
committer | Sean Nelson <audiohacked@gmail.com> | 2010-05-07 20:09:04 +0000 |
commit | 316a29f33f7b4f549097c102cf2e56a30d7e3cac (patch) | |
tree | 544d1dea8706b7b9e3591f81eba8be45fc054ab8 /pcidev.c | |
parent | 270237687a7f550e86c01548550f25b1d0a31d65 (diff) | |
download | flashrom-316a29f33f7b4f549097c102cf2e56a30d7e3cac.tar.gz flashrom-316a29f33f7b4f549097c102cf2e56a30d7e3cac.tar.bz2 flashrom-316a29f33f7b4f549097c102cf2e56a30d7e3cac.zip |
Convert various prints to use msg_p* and msg_g* respectively
Convert programmer print messages to msg_p* convert general print messages to msg_g* a few fixes as suggested by Carl-Daniel.
Corresponding to flashrom svn r997.
Signed-off-by: Sean Nelson <audiohacked@gmail.com>
Acked-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Diffstat (limited to 'pcidev.c')
-rw-r--r-- | pcidev.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -45,7 +45,7 @@ uint32_t pcidev_validate(struct pci_dev *dev, uint32_t bar, */ addr = pci_read_long(dev, bar); - printf("Found \"%s %s\" (%04x:%04x, BDF %02x:%02x.%x).\n", + msg_pinfo("Found \"%s %s\" (%04x:%04x, BDF %02x:%02x.%x).\n", devs[i].vendor_name, devs[i].device_name, dev->vendor_id, dev->device_id, dev->bus, dev->dev, dev->func); @@ -66,7 +66,7 @@ uint32_t pcidev_validate(struct pci_dev *dev, uint32_t bar, } if (devs[i].status == NT) { - printf("===\nThis PCI device is UNTESTED. Please " + msg_pinfo("===\nThis PCI device is UNTESTED. Please " "report the 'flashrom -p xxxx' output \n" "to flashrom@flashrom.org if it works " "for you. Thank you for your help!\n===\n"); @@ -95,7 +95,7 @@ uint32_t pcidev_init(uint16_t vendor_id, uint32_t bar, filter.vendor = vendor_id; if (pcidev_bdf != NULL) { if ((msg = pci_filter_parse_slot(&filter, pcidev_bdf))) { - fprintf(stderr, "Error: %s\n", msg); + msg_perr("Error: %s\n", msg); exit(1); } } @@ -112,10 +112,10 @@ uint32_t pcidev_init(uint16_t vendor_id, uint32_t bar, /* Only continue if exactly one supported PCI dev has been found. */ if (found == 0) { - fprintf(stderr, "Error: No supported PCI device found.\n"); + msg_perr("Error: No supported PCI device found.\n"); exit(1); } else if (found > 1) { - fprintf(stderr, "Error: Multiple supported PCI devices found. " + msg_perr("Error: Multiple supported PCI devices found. " "Use 'flashrom -p xxxx:bb:dd.f' \n" "to explicitly select the card with the given BDF " "(PCI bus, device, function).\n"); @@ -130,7 +130,7 @@ void print_supported_pcidevs(struct pcidev_status *devs) int i; for (i = 0; devs[i].vendor_name != NULL; i++) { - printf("%s %s [%02x:%02x]%s\n", devs[i].vendor_name, + msg_pinfo("%s %s [%02x:%02x]%s\n", devs[i].vendor_name, devs[i].device_name, devs[i].vendor_id, devs[i].device_id, (devs[i].status == NT) ? " (untested)" : ""); |