minix/lib/libc/sys-minix/getgroups.c

28 lines
389 B
C
Raw Normal View History

/*
getgroups.c
*/
#include <sys/cdefs.h>
#include "namespace.h"
#include <lib.h>
#include <string.h>
#include <unistd.h>
#ifdef __weak_alias
__weak_alias(getgroups, _getgroups)
#endif
2012-03-25 20:25:53 +02:00
int getgroups(int ngroups, gid_t *arr)
{
message m;
memset(&m, 0, sizeof(m));
m.PM_GROUPS_NUM = ngroups;
m.PM_GROUPS_PTR = (char *) arr;
return(_syscall(PM_PROC_NR, PM_GETGROUPS, &m));
}