Skip to content

Commit 4aeaa27

Browse files
committed
move getmntopts(3) to libutil, build and install also it's manpage
bump libutil minor adjust individual mount_*/Makefile to use libutil getmntopts(3)
1 parent 321d222 commit 4aeaa27

File tree

26 files changed

+98
-101
lines changed

26 files changed

+98
-101
lines changed

distrib/sets/lists/base/shl.mi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: shl.mi,v 1.203 2003/03/05 20:18:14 tshiozak Exp $
1+
# $NetBSD: shl.mi,v 1.204 2003/03/22 12:44:02 jdolecek Exp $
22
# Note: libtermcap and libtermlib are hardlinked and share the same version.
33
./lib/libc.so.12.96 base-sys-shlib
44
./lib/libcrypt.so.0.1 base-sys-shlib
@@ -10,7 +10,7 @@
1010
./lib/libm.so.0.1 base-sys-shlib
1111
./lib/libtermcap.so.0.5 base-sys-shlib
1212
./lib/libtermlib.so.0.5 base-sys-shlib
13-
./lib/libutil.so.7.1 base-sys-shlib
13+
./lib/libutil.so.7.2 base-sys-shlib
1414
./lib/libz.so.0.3 base-sys-shlib
1515
./usr/lib/i18n/libBIG5.so.4.1 base-i18n-shlib
1616
./usr/lib/i18n/libEUC.so.4.1 base-i18n-shlib
@@ -63,6 +63,6 @@
6363
./usr/lib/libtermcap.so.0.5 base-sys-shlib
6464
./usr/lib/libtermlib.so.0.5 base-sys-shlib
6565
./usr/lib/libusbhid.so.1.0 base-sys-shlib
66-
./usr/lib/libutil.so.7.1 base-sys-shlib
66+
./usr/lib/libutil.so.7.2 base-sys-shlib
6767
./usr/lib/libwrap.so.0.2 base-net-shlib
6868
./usr/lib/libz.so.0.3 base-sys-shlib

distrib/sets/lists/comp/mi

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: mi,v 1.545 2003/03/10 08:01:11 lukem Exp $
1+
# $NetBSD: mi,v 1.546 2003/03/22 12:44:02 jdolecek Exp $
22
./usr/bin/addr2line comp-debug-bin
33
./usr/bin/ar comp-util-bin
44
./usr/bin/as comp-util-bin
@@ -330,6 +330,7 @@
330330
./usr/include/miscfs/umapfs/umap.h comp-c-include
331331
./usr/include/miscfs/union comp-c-include
332332
./usr/include/miscfs/union/union.h comp-c-include
333+
./usr/include/mntopts.h comp-c-include
333334
./usr/include/mpool.h comp-c-include
334335
./usr/include/msdosfs comp-c-include
335336
./usr/include/msdosfs/bootsect.h comp-c-include
@@ -2066,6 +2067,7 @@
20662067
./usr/share/man/cat3/getmaxx.0 comp-c-catman
20672068
./usr/share/man/cat3/getmaxy.0 comp-c-catman
20682069
./usr/share/man/cat3/getmntinfo.0 comp-c-catman
2070+
./usr/share/man/cat3/getmntopts.0 comp-c-catman
20692071
./usr/share/man/cat3/getmode.0 comp-c-catman
20702072
./usr/share/man/cat3/getnameinfo.0 comp-c-catman
20712073
./usr/share/man/cat3/getnetbyaddr.0 comp-c-catman
@@ -5117,6 +5119,7 @@
51175119
./usr/share/man/man3/getmaxx.3 comp-c-man
51185120
./usr/share/man/man3/getmaxy.3 comp-c-man
51195121
./usr/share/man/man3/getmntinfo.3 comp-c-man
5122+
./usr/share/man/man3/getmntopts.3 comp-c-man
51205123
./usr/share/man/man3/getmode.3 comp-c-man
51215124
./usr/share/man/man3/getnameinfo.3 comp-c-man
51225125
./usr/share/man/man3/getnetbyaddr.3 comp-c-man
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: mntopts.h,v 1.11 2002/11/07 12:43:50 christos Exp $ */
1+
/* $NetBSD: mntopts.h,v 1.1 2003/03/22 12:44:03 jdolecek Exp $ */
22

33
/*-
44
* Copyright (c) 1994

lib/libutil/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# $NetBSD: Makefile,v 1.42 2002/12/12 09:45:33 scw Exp $
1+
# $NetBSD: Makefile,v 1.43 2003/03/22 12:44:04 jdolecek Exp $
22
# @(#)Makefile 8.1 (Berkeley) 6/4/93
33

44
USE_SHLIBDIR= yes
@@ -7,14 +7,17 @@ USE_SHLIBDIR= yes
77

88
LIB= util
99
CPPFLAGS+=-DLIBC_SCCS
10-
SRCS= getbootfile.c getlabelsector.c getmaxpartitions.c getrawpartition.c \
10+
SRCS= getbootfile.c getlabelsector.c getmaxpartitions.c \
11+
getmntopts.c getrawpartition.c \
1112
disklabel_dkcksum.c disklabel_scan.c \
1213
login.c loginx.c login_cap.c login_tty.c logout.c logoutx.c \
1314
logwtmp.c logwtmpx.c opendisk.c \
1415
passwd.c pw_scan.c pidfile.c pidlock.c pty.c secure_path.c \
1516
snprintb.c ttyaction.c ttymsg.c
1617

17-
MAN= getbootfile.3 getlabelsector.3 getmaxpartitions.3 getrawpartition.3 \
18+
MAN= getbootfile.3 getlabelsector.3 getmaxpartitions.3 \
19+
getmntopts.3 \
20+
getrawpartition.3 \
1821
login.3 login_cap.3 loginx.3 \
1922
disklabel_dkcksum.3 disklabel_scan.3 \
2023
opendisk.3 openpty.3 pidfile.3 pidlock.3 \
Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.\" $NetBSD: getmntopts.3,v 1.6 2002/02/08 01:30:44 ross Exp $
1+
.\" $NetBSD: getmntopts.3,v 1.1 2003/03/22 12:44:04 jdolecek Exp $
22
.\"
33
.\" Copyright (c) 1994
44
.\" The Regents of the University of California. All rights reserved.
@@ -33,16 +33,18 @@
3333
.\"
3434
.\" @(#)getmntopts.3 8.3 (Berkeley) 3/30/95
3535
.\"
36-
.Dd March 30, 1995
36+
.Dd March 22, 2003
3737
.Dt GETMNTOPTS 3
3838
.Os
3939
.Sh NAME
4040
.Nm getmntopts
4141
.Nd scan mount options
42+
.Sh LIBRARY
43+
.Lb libutil
4244
.Sh SYNOPSIS
4345
.Fd #include \*[Lt]mntopts.h\*[Gt]
4446
.Ft void
45-
.Fn getmntopts "char *options" "struct mntopt *mopts" "int *flagp" "int *altflagp"
47+
.Fn getmntopts "const char *options" "const struct mntopt *mopts" "int *flagp" "int *altflagp"
4648
.Sh DESCRIPTION
4749
The
4850
.Nm getmntopts
@@ -71,7 +73,7 @@ The table,
7173
has the following format:
7274
.Bd -literal
7375
struct mntopt {
74-
char *m_option; /* option name */
76+
const char *m_option; /* option name */
7577
int m_inverse; /* is this a negative option, eg "dev" */
7678
int m_flag; /* bit to set, eg MNT_RDONLY */
7779
int m_altloc; /* non-zero to use altflagp rather than flagp */
@@ -147,9 +149,9 @@ flag, would also have an
147149
entry.
148150
This can be declared and used as follows:
149151
.Bd -literal
150-
#include "mntopts.h"
152+
#include <mntopts.h>
151153

152-
struct mntopt mopts[] = {
154+
static const struct mntopt mopts[] = {
153155
MOPT_STDOPTS,
154156
MOPT_UPDATE,
155157
{ NULL }
@@ -179,3 +181,5 @@ The
179181
.Fn getmntopts
180182
function appeared in
181183
.Bx 4.4 .
184+
It was moved to utilities library in
185+
.Nx 2.0 .
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $NetBSD: getmntopts.c,v 1.6 1999/11/09 15:06:33 drochner Exp $ */
1+
/* $NetBSD: getmntopts.c,v 1.1 2003/03/22 12:44:04 jdolecek Exp $ */
22

33
/*-
44
* Copyright (c) 1994
@@ -38,7 +38,7 @@
3838
#if 0
3939
static char sccsid[] = "@(#)getmntopts.c 8.3 (Berkeley) 3/29/95";
4040
#else
41-
__RCSID("$NetBSD: getmntopts.c,v 1.6 1999/11/09 15:06:33 drochner Exp $");
41+
__RCSID("$NetBSD: getmntopts.c,v 1.1 2003/03/22 12:44:04 jdolecek Exp $");
4242
#endif
4343
#endif /* not lint */
4444

@@ -51,7 +51,7 @@ __RCSID("$NetBSD: getmntopts.c,v 1.6 1999/11/09 15:06:33 drochner Exp $");
5151
#include <stdlib.h>
5252
#include <string.h>
5353

54-
#include "mntopts.h"
54+
#include <mntopts.h>
5555

5656
int getmnt_silent = 0;
5757

lib/libutil/shlib_version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# $NetBSD: shlib_version,v 1.31 2002/12/12 09:46:49 scw Exp $
1+
# $NetBSD: shlib_version,v 1.32 2003/03/22 12:44:04 jdolecek Exp $
22
# Remember to update distrib/sets/lists/base/shl.* when changing
33
#
44
major=7
5-
minor=1
5+
minor=2

sbin/mount/Makefile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
# $NetBSD: Makefile,v 1.27 2003/01/19 12:37:41 tsutsui Exp $
1+
# $NetBSD: Makefile,v 1.28 2003/03/22 12:44:04 jdolecek Exp $
22
# @(#)Makefile 8.6 (Berkeley) 5/8/95
33

44
.include <bsd.own.mk>
55

66
PROG= mount
77
MAN= mount.8
88
SRCS= mount.c vfslist.c
9-
# We do NOT install the getmntopts.3 man page.
10-
# getmntopts.c in this directory is used by different mount programs which
11-
# use .PATH directives to get it.
129

1310
.if defined(RESCUEDIR)
1411
CPPFLAGS+= -D_PATH_RESCUE=\"${RESCUEDIR}\"

sbin/mount_ados/Makefile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
# $NetBSD: Makefile,v 1.10 2002/08/19 10:16:55 lukem Exp $
1+
# $NetBSD: Makefile,v 1.11 2003/03/22 12:43:57 jdolecek Exp $
22

33
.include <bsd.own.mk>
44

55
PROG= mount_ados
6-
SRCS= mount_ados.c getmntopts.c fattr.c
6+
SRCS= mount_ados.c fattr.c
77
MAN= mount_ados.8
88

99
MOUNT= ${NETBSDSRCDIR}/sbin/mount
1010
CPPFLAGS+= -I${NETBSDSRCDIR}/sys -I${MOUNT}
1111
.PATH: ${MOUNT}
1212

13+
DPADD+=${LIBUTIL}
14+
LDADD+=-lutil
15+
1316
.include <bsd.prog.mk>

sbin/mount_cd9660/Makefile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
1-
# $NetBSD: Makefile,v 1.8 2002/09/21 18:43:33 christos Exp $
1+
# $NetBSD: Makefile,v 1.9 2003/03/22 12:43:58 jdolecek Exp $
22
# @(#)Makefile 8.3 (Berkeley) 3/27/94
33

44
.include <bsd.own.mk>
55

66
PROG= mount_cd9660
7-
SRCS= mount_cd9660.c getmntopts.c
7+
SRCS= mount_cd9660.c
88
MAN= mount_cd9660.8
99

1010
MOUNT= ${NETBSDSRCDIR}/sbin/mount
11-
CPPFLAGS+= -I${MOUNT}
12-
.PATH: ${MOUNT}
1311

1412
DPADD+=${LIBUTIL}
1513
LDADD+=-lutil

0 commit comments

Comments
 (0)