7 #include <minix/sysutil.h>
9 /*===========================================================================*
11 *===========================================================================*/
12 char *pci_slot_name(devind
)
15 static char name
[80]; /* We need a better interface for this */
21 gid
= cpf_grant_direct(pci_procnr
, (vir_bytes
)name
, sizeof(name
),
25 printf("pci_dev_name: cpf_grant_direct failed: %d\n",
30 m
.m_type
= BUSC_PCI_SLOT_NAME_S
;
32 m
.m1_i2
= sizeof(name
);
35 r
= sendrec(pci_procnr
, &m
);
38 panic("pci_slot_name: can't talk to PCI: %d", r
);
41 panic("pci_slot_name: got bad reply from PCI: %d", m
.m_type
);
43 name
[sizeof(name
)-1]= '\0'; /* Make sure that the string is NUL