]> Zhao Yanbai Git Server - minix.git/commitdiff
Added pci_del_acl. Fixed return value of pci_set_acl.
authorPhilip Homburg <philip@cs.vu.nl>
Mon, 23 Apr 2007 12:14:44 +0000 (12:14 +0000)
committerPhilip Homburg <philip@cs.vu.nl>
Mon, 23 Apr 2007 12:14:44 +0000 (12:14 +0000)
lib/syslib/Makefile.in
lib/syslib/pci_del_acl.c [new file with mode: 0644]
lib/syslib/pci_set_acl.c

index bcefd8804cbd3c90b42d037c26e733c6de65d4a4..ad051f1a84873b3f7283eaa5539d8a487e4629b5 100644 (file)
@@ -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 (file)
index 0000000..6a09cc3
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+pci_del_acl.c
+*/
+
+#include "pci.h"
+#include "syslib.h"
+#include <unistd.h>
+#include <minix/rs.h>
+#include <minix/sysutil.h>
+
+/*===========================================================================*
+ *                             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;
+}
+
index 164a17791c9ee173ff2f3b3d635c53c06cf423a6..d5ee446a5d76662730a26f341504be906402e29f 100644 (file)
@@ -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;
 }