r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_attr_r16: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_attr_r16: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_attr_r16: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_attr_r16: got bad reply from PCI", m.m_type);
return m.m2_l1;
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_attr_r32: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_attr_r32: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_attr_r32: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_attr_r32: got bad reply from PCI", m.m_type);
return m.m2_l1;
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_attr_r8: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_attr_r8: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_attr_r8: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_attr_r8: got bad reply from PCI", m.m_type);
return m.m2_l1;
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_attr_w16: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_attr_w16: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_attr_w16: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_attr_w16: got bad reply from PCI", m.m_type);
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_attr_w32: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_attr_w32: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_attr_w32: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_attr_w32: got bad reply from PCI", m.m_type);
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_attr_w8: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_attr_w8: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_attr_w8: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_attr_w8: got bad reply from PCI", m.m_type);
}
#include "syslib.h"
#include <unistd.h>
#include <minix/rs.h>
+#include <minix/ds.h>
#include <minix/sysutil.h>
/*===========================================================================*
{
int r;
message m;
+ u32_t u32;
if (pci_procnr == ANY)
{
- r= _pm_findproc("pci", &pci_procnr);
+ r= ds_retrieve_u32("pci", &u32);
if (r != 0)
{
- panic("pci",
+ panic("syslib/" __FILE__,
"pci_del_acl: _pm_findproc failed for 'pci'",
r);
}
+ pci_procnr = u32;
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_del_acl: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_del_acl: can't talk to PCI", r);
return m.m_type;
}
r= sendrec(pci_procnr, &m);
cpf_revoke(gid);
if (r != 0)
- panic("pci", "pci_dev_name: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_dev_name: can't talk to PCI", r);
if (m.m_type == ENOENT)
{
return NULL; /* No name for this device */
}
if (m.m_type != 0)
- panic("pci", "pci_dev_name: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_dev_name: got bad reply from PCI", m.m_type);
name[sizeof(name)-1]= '\0'; /* Make sure that the string is NUL
* terminated.
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_find_dev: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_find_dev: can't talk to PCI", r);
if (m.m_type == 1)
{
return 1;
}
if (m.m_type != 0)
- panic("pci", "pci_find_dev: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_find_dev: got bad reply from PCI", m.m_type);
printf("pci_find_dev: got nothing\n");
return 0;
m.m_type= BUSC_PCI_FIRST_DEV;
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_first_dev: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_first_dev: can't talk to PCI", r);
if (m.m_type == 1)
{
*devindp= m.m1_i1;
return 1;
}
if (m.m_type != 0)
- panic("pci", "pci_first_dev: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_first_dev: got bad reply from PCI", m.m_type);
#if DEBUG
printf("pci_first_dev: got nothing\n");
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_ids: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_ids: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_ids: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_ids: got bad reply from PCI", m.m_type);
*vidp= m.m1_i1;
*didp= m.m1_i2;
printf("pci_ids: %04x/%04x\n", *vidp, *didp);
r= ds_retrieve_u32("pci", &u32);
if (r != 0)
- panic("pci", "pci_init1: ds_retrieve_u32 failed for 'pci'", r);
+ panic("syslib/" __FILE__, "pci_init1: ds_retrieve_u32 failed for 'pci'", r);
pci_procnr= u32;
m.m_type= BUSC_PCI_INIT;
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_init1: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_init1: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_init1: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_init1: got bad reply from PCI", m.m_type);
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_next_dev: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_next_dev: can't talk to PCI", r);
if (m.m_type == 1)
{
return 1;
}
if (m.m_type != 0)
- panic("pci", "pci_next_dev: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_next_dev: got bad reply from PCI", m.m_type);
return 0;
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_rescan_bus: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_rescan_bus: can't talk to PCI", r);
if (m.m_type != 0)
{
- panic("pci", "pci_rescan_bus: got bad reply from PCI",
+ panic("syslib/" __FILE__, "pci_rescan_bus: got bad reply from PCI",
m.m_type);
}
}
r= sendrec(pci_procnr, &m);
if (r != 0)
- panic("pci", "pci_reserve: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_reserve: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_reserve: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_reserve: got bad reply from PCI", m.m_type);
}
/*===========================================================================*
#include "syslib.h"
#include <unistd.h>
#include <minix/rs.h>
+#include <minix/ds.h>
#include <minix/sysutil.h>
/*===========================================================================*
int r;
cp_grant_id_t gid;
message m;
+ u32_t u32;
if (pci_procnr == ANY)
{
- r= _pm_findproc("pci", &pci_procnr);
+ r= ds_retrieve_u32("pci", &u32);
if (r != 0)
{
- panic("pci",
- "pci_set_acl: _pm_findproc failed for 'pci'",
+ panic("syslib/" __FILE__,
+ "pci_set_acl: ds_retrieve_u32 failed for 'pci'",
r);
}
+ pci_procnr = u32;
}
r= sendrec(pci_procnr, &m);
cpf_revoke(gid);
if (r != 0)
- panic("pci", "pci_set_acl: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_set_acl: can't talk to PCI", r);
return m.m_type;
}
r= sendrec(pci_procnr, &m);
cpf_revoke(gid);
if (r != 0)
- panic("pci", "pci_slot_name: can't talk to PCI", r);
+ panic("syslib/" __FILE__, "pci_slot_name: can't talk to PCI", r);
if (m.m_type != 0)
- panic("pci", "pci_slot_name: got bad reply from PCI", m.m_type);
+ panic("syslib/" __FILE__, "pci_slot_name: got bad reply from PCI", m.m_type);
name[sizeof(name)-1]= '\0'; /* Make sure that the string is NUL
* terminated.