repo.or.cz
/
minix.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
etc/services - sync with NetBSD-8
[minix.git]
/
minix
/
lib
/
libc
/
sys
/
getgroups.c
blob
e1c6f5e81762b60c91a507398eb00442f1f6e345
1
/*
2
getgroups.c
3
*/
4
5
#include <sys/cdefs.h>
6
#include
"namespace.h"
7
#include <lib.h>
8
9
#include <string.h>
10
#include <unistd.h>
11
12
int
getgroups
(
int
ngroups
,
gid_t
*
arr
)
13
{
14
message m
;
15
16
memset
(&
m
,
0
,
sizeof
(
m
));
17
m
.
m_lc_pm_groups
.
num
=
ngroups
;
18
m
.
m_lc_pm_groups
.
ptr
= (
vir_bytes
)
arr
;
19
20
return
(
_syscall
(
PM_PROC_NR
,
PM_GETGROUPS
, &
m
));
21
}
22