libutil: add getmaxpartitions() implementation

Change-Id: I6f1d7838e10bcb079fb5b68ff513c3279fffb4f9
This commit is contained in:
Jean-Baptiste Boric 2015-09-11 10:52:26 +02:00 committed by Lionel Sambuc
parent 41a30155b9
commit 22ad44d6a9
4 changed files with 15 additions and 1 deletions

View file

@ -3718,6 +3718,7 @@
./usr/man/man3/getlastlogx.3 minix-sys ./usr/man/man3/getlastlogx.3 minix-sys
./usr/man/man3/getline.3 minix-sys ./usr/man/man3/getline.3 minix-sys
./usr/man/man3/getloadavg.3 minix-sys ./usr/man/man3/getloadavg.3 minix-sys
./usr/man/man3/getmaxpartitions.3 minix-sys
./usr/man/man3/getmaxx.3 minix-sys ./usr/man/man3/getmaxx.3 minix-sys
./usr/man/man3/getmaxy.3 minix-sys ./usr/man/man3/getmaxy.3 minix-sys
./usr/man/man3/getmaxyx.3 minix-sys ./usr/man/man3/getmaxyx.3 minix-sys

View file

@ -25,7 +25,7 @@ SRCS+= efun.c \
MAN= efun.3 \ MAN= efun.3 \
getmntopts.3 \ getmntopts.3 \
getfsspecname.3 \ getmaxpartitions.3 getfsspecname.3 \
login.3 login_cap.3 loginx.3 \ login.3 login_cap.3 loginx.3 \
opendisk.3 openpty.3 parsedate.3 pidfile.3 pidlock.3 \ opendisk.3 openpty.3 parsedate.3 pidfile.3 pidlock.3 \
pw_getconf.3 pw_init.3 pw_lock.3 secure_path.3 \ pw_getconf.3 pw_init.3 pw_lock.3 secure_path.3 \
@ -33,6 +33,10 @@ MAN= efun.3 \
snprintb.3 sockaddr_snprintf.3 stat_flags.3 strpct.3 ttyaction.3 \ snprintb.3 sockaddr_snprintf.3 stat_flags.3 strpct.3 ttyaction.3 \
ttymsg.3 util.3 ttymsg.3 util.3
.if defined(__MINIX)
.include "${NETBSDSRCDIR}/minix/lib/libutil/Makefile.inc"
.endif
YPREFIX=__pd YPREFIX=__pd
.PATH: ${NETBSDSRCDIR}/lib/libc/gen .PATH: ${NETBSDSRCDIR}/lib/libc/gen

View file

@ -0,0 +1,3 @@
.PATH: ${NETBSDSRCDIR}/minix/lib/libutil
SRCS+= getmaxpartitions.c

View file

@ -0,0 +1,6 @@
#include <machine/partition.h>
int getmaxpartitions(void)
{
return NR_PARTITIONS;
}