]> Zhao Yanbai Git Server - minix.git/commitdiff
libutil: add getmaxpartitions() implementation 07/3207/1
authorJean-Baptiste Boric <jblbeurope@gmail.com>
Fri, 11 Sep 2015 08:52:26 +0000 (10:52 +0200)
committerLionel Sambuc <lionel.sambuc@gmail.com>
Wed, 7 Oct 2015 10:36:36 +0000 (12:36 +0200)
Change-Id: I6f1d7838e10bcb079fb5b68ff513c3279fffb4f9

distrib/sets/lists/minix/mi
lib/libutil/Makefile
minix/lib/libutil/Makefile.inc [new file with mode: 0644]
minix/lib/libutil/getmaxpartitions.c [new file with mode: 0644]

index 1c74b3f64bb82116b830d32080f030e6dc058398..05771c69c2d0842445b3637b4874929d6eda7af0 100644 (file)
 ./usr/man/man3/getlastlogx.3                           minix-sys
 ./usr/man/man3/getline.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/getmaxy.3                               minix-sys
 ./usr/man/man3/getmaxyx.3                              minix-sys
index 7ee6eb2fabde2e5be1ffcb7ab5ef5fe5ed32c9c8..9524703edfa5ba6d0c5de2f678e64d79eb48e593 100644 (file)
@@ -25,7 +25,7 @@ SRCS+=        efun.c \
 
 MAN=   efun.3 \
        getmntopts.3 \
-       getfsspecname.3 \
+       getmaxpartitions.3 getfsspecname.3 \
        login.3 login_cap.3 loginx.3 \
        opendisk.3 openpty.3 parsedate.3 pidfile.3 pidlock.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 \
        ttymsg.3 util.3
 
+.if defined(__MINIX)
+.include "${NETBSDSRCDIR}/minix/lib/libutil/Makefile.inc"
+.endif
+
 YPREFIX=__pd
 .PATH: ${NETBSDSRCDIR}/lib/libc/gen
 
diff --git a/minix/lib/libutil/Makefile.inc b/minix/lib/libutil/Makefile.inc
new file mode 100644 (file)
index 0000000..9de8350
--- /dev/null
@@ -0,0 +1,3 @@
+.PATH: ${NETBSDSRCDIR}/minix/lib/libutil
+
+SRCS+=         getmaxpartitions.c
\ No newline at end of file
diff --git a/minix/lib/libutil/getmaxpartitions.c b/minix/lib/libutil/getmaxpartitions.c
new file mode 100644 (file)
index 0000000..d154204
--- /dev/null
@@ -0,0 +1,6 @@
+#include <machine/partition.h>
+
+int getmaxpartitions(void)
+{
+       return NR_PARTITIONS;
+}