1*433d6423SLionel Sambuc /* 2*433d6423SLionel Sambuc getgroups.c 3*433d6423SLionel Sambuc */ 4*433d6423SLionel Sambuc 5*433d6423SLionel Sambuc #include <sys/cdefs.h> 6*433d6423SLionel Sambuc #include "namespace.h" 7*433d6423SLionel Sambuc #include <lib.h> 8*433d6423SLionel Sambuc 9*433d6423SLionel Sambuc #include <string.h> 10*433d6423SLionel Sambuc #include <unistd.h> 11*433d6423SLionel Sambuc getgroups(int ngroups,gid_t * arr)12*433d6423SLionel Sambucint getgroups(int ngroups, gid_t *arr) 13*433d6423SLionel Sambuc { 14*433d6423SLionel Sambuc message m; 15*433d6423SLionel Sambuc 16*433d6423SLionel Sambuc memset(&m, 0, sizeof(m)); 17*433d6423SLionel Sambuc m.m_lc_pm_groups.num = ngroups; 18*433d6423SLionel Sambuc m.m_lc_pm_groups.ptr = (vir_bytes)arr; 19*433d6423SLionel Sambuc 20*433d6423SLionel Sambuc return(_syscall(PM_PROC_NR, PM_GETGROUPS, &m)); 21*433d6423SLionel Sambuc } 22*433d6423SLionel Sambuc 23