diff options
author | Martin Mares <mj@ucw.cz> | 2022-01-21 14:09:16 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2022-01-21 14:09:16 +0100 |
commit | eeef8fed3e6bd34c553ee8cb16d5fc1b703120af (patch) | |
tree | 8b1b7152e5a2c8de215dc434d987ecce37b030dc | |
parent | 884a163407cbc179b694294771a016071a6b6dd3 (diff) | |
download | pciutils-eeef8fed3e6bd34c553ee8cb16d5fc1b703120af.tar.gz |
pci.h: The error callback is now declared with PCI_NONRET
Users of the repeatedly complain that the library crashes, which is
usually caused by providing an error hook which returns to the library.
Let's try warning them more explicitly.
-rw-r--r-- | lib/init.c | 2 | ||||
-rw-r--r-- | lib/pci.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -96,7 +96,7 @@ static int probe_sequence[] = { -1, }; -static void +static void PCI_NONRET pci_generic_error(char *msg, ...) { va_list args; @@ -62,7 +62,7 @@ struct pci_access { int debugging; /* Turn on debugging messages */ /* Functions you can override: */ - void (*error)(char *msg, ...) PCI_PRINTF(1,2); /* Write error message and quit */ + void (*error)(char *msg, ...) PCI_PRINTF(1,2) PCI_NONRET; /* Write error message and quit */ void (*warning)(char *msg, ...) PCI_PRINTF(1,2); /* Write a warning message */ void (*debug)(char *msg, ...) PCI_PRINTF(1,2); /* Write a debugging message */ |