don't print SYSTEM stacktrace on exceptions as it's not scheduled any more.
[minix.git] / lib / libsys / pci_init1.c
blobbe929d9b85c307fd55653ae911cd5bb14dd167c0
1 /*
2 pci_init1.c
3 */
5 #include "pci.h"
6 #include "syslib.h"
7 #include <string.h>
8 #include <unistd.h>
9 #include <minix/ds.h>
10 #include <minix/sysutil.h>
12 int pci_procnr= ANY;
14 /*===========================================================================*
15 * pci_init1 *
16 *===========================================================================*/
17 PUBLIC void pci_init1(name)
18 char *name;
20 int r;
21 u32_t u32;
22 size_t len;
23 message m;
25 r= ds_retrieve_label_num("pci", &u32);
26 if (r != 0)
27 panic("pci_init1: ds_retrieve_label_num failed for 'pci': %d", r);
28 pci_procnr= u32;
30 m.m_type= BUSC_PCI_INIT;
31 len= strlen(name);
32 if (len+1 <= sizeof(m.m3_ca1))
33 strcpy(m.m3_ca1, name);
34 else
36 len= sizeof(m.m3_ca1)-1;
37 memcpy(m.m3_ca1, name, len);
38 m.m3_ca1[len]= '\0';
40 r= sendrec(pci_procnr, &m);
41 if (r != 0)
42 panic("pci_init1: can't talk to PCI: %d", r);
43 if (m.m_type != 0)
44 panic("pci_init1: got bad reply from PCI: %d", m.m_type);