From: Philip Homburg Date: Mon, 23 Apr 2007 12:14:44 +0000 (+0000) Subject: Added pci_del_acl. Fixed return value of pci_set_acl. X-Git-Tag: v3.1.4~430 X-Git-Url: http://zhaoyanbai.com/repos/%22../static/icons/index.html?a=commitdiff_plain;h=82e77742b58d55a72a725df50797ac85acf43a99;p=minix.git Added pci_del_acl. Fixed return value of pci_set_acl. --- diff --git a/lib/syslib/Makefile.in b/lib/syslib/Makefile.in index bcefd8804..ad051f1a8 100644 --- a/lib/syslib/Makefile.in +++ b/lib/syslib/Makefile.in @@ -13,6 +13,7 @@ libsys_FILES=" \ pci_attr_w16.c \ pci_attr_w32.c \ pci_attr_w8.c \ + pci_del_acl.c \ pci_dev_name.c \ pci_find_dev.c \ pci_first_dev.c \ diff --git a/lib/syslib/pci_del_acl.c b/lib/syslib/pci_del_acl.c new file mode 100644 index 000000000..6a09cc30f --- /dev/null +++ b/lib/syslib/pci_del_acl.c @@ -0,0 +1,41 @@ +/* +pci_del_acl.c +*/ + +#include "pci.h" +#include "syslib.h" +#include +#include +#include + +/*===========================================================================* + * pci_del_acl * + *===========================================================================*/ +PUBLIC int pci_del_acl(proc_nr) +endpoint_t proc_nr; +{ + int r; + message m; + + if (pci_procnr == ANY) + { + r= _pm_findproc("pci", &pci_procnr); + if (r != 0) + { + panic("pci", + "pci_del_acl: _pm_findproc failed for 'pci'", + r); + } + } + + + m.m_type= BUSC_PCI_DEL_ACL; + m.m1_i1= proc_nr; + + r= sendrec(pci_procnr, &m); + if (r != 0) + panic("pci", "pci_del_acl: can't talk to PCI", r); + + return m.m_type; +} + diff --git a/lib/syslib/pci_set_acl.c b/lib/syslib/pci_set_acl.c index 164a17791..d5ee446a5 100644 --- a/lib/syslib/pci_set_acl.c +++ b/lib/syslib/pci_set_acl.c @@ -39,7 +39,7 @@ struct rs_pci *rs_pci; return EINVAL; } - m.m_type= BUSC_PCI_ACL; + m.m_type= BUSC_PCI_SET_ACL; m.m1_i1= gid; r= sendrec(pci_procnr, &m); @@ -47,6 +47,6 @@ struct rs_pci *rs_pci; if (r != 0) panic("pci", "pci_set_acl: can't talk to PCI", r); - return r; + return m.m_type; }