CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: mrg Date: Sun Feb 3 12:03:22 UTC 2019 Modified Files: src/usr.sbin/autofs: common.h Log Message: - mark log_err() and log_errx() as __dead. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/common.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/common.h diff -u src/usr.sbin/autofs/common.h:1.1 src/usr.sbin/autofs/common.h:1.2 --- src/usr.sbin/autofs/common.h:1.1 Tue Jan 9 03:31:15 2018 +++ src/usr.sbin/autofs/common.h Sun Feb 3 12:03:22 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: common.h,v 1.1 2018/01/09 03:31:15 christos Exp $ */ +/* $NetBSD: common.h,v 1.2 2019/02/03 12:03:22 mrg Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -70,8 +70,8 @@ struct defined_value { void log_init(int); void log_set_peer_name(const char *); void log_set_peer_addr(const char *); -void log_err(int, const char *, ...) __printflike(2, 3); -void log_errx(int, const char *, ...) __printflike(2, 3); +void log_err(int, const char *, ...) __printflike(2, 3) __dead; +void log_errx(int, const char *, ...) __printflike(2, 3) __dead; void log_warn(const char *, ...) __printflike(1, 2); void log_warnx(const char *, ...) __printflike(1, 2); void log_debugx(const char *, ...) __printflike(1, 2);
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: uwe Date: Thu Jan 25 19:15:10 UTC 2018 Modified Files: src/usr.sbin/autofs: auto_master.5 Log Message: .Li is superfluous inside .Bd -literal To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/autofs/auto_master.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/auto_master.5 diff -u src/usr.sbin/autofs/auto_master.5:1.5 src/usr.sbin/autofs/auto_master.5:1.6 --- src/usr.sbin/autofs/auto_master.5:1.5 Wed Jan 24 12:05:50 2018 +++ src/usr.sbin/autofs/auto_master.5 Thu Jan 25 19:15:10 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: auto_master.5,v 1.5 2018/01/24 12:05:50 uwe Exp $ +.\" $NetBSD: auto_master.5,v 1.6 2018/01/25 19:15:10 uwe Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -176,14 +176,14 @@ field are replaced with the value of .Ar key . This is typically used with wildcards, like: .Bd -literal -offset indent -.Li * 192.168.1.1:/share/& +* 192.168.1.1:/share/& .Ed .Pp The .Ar location field may contain references to variables, like: .Bd -literal -offset indent -.Li sys 192.168.1.1:/sys/${OSNAME} +sys 192.168.1.1:/sys/${OSNAME} .Ed .Pp Defined variables are: @@ -237,18 +237,18 @@ and mount options, described in .Xr mount_nfs 8 : .Bd -literal -offset indent -.Li x -intr,nfsv4 192.168.1.1:/share/example/x +x -intr,nfsv4 192.168.1.1:/share/example/x .Ed .Pp Automatically mount an SMB share on access, as a guest user, without prompting for a password: .Bd -literal -offset indent -.Li share -fstype=smbfs,-N ://@server/share +share -fstype=smbfs,-N ://@server/share .Ed .Pp Automatically mount the CD drive on access: .Bd -literal -offset indent -.Li cd -fstype=cd9660 :/dev/cd0 +cd -fstype=cd9660 :/dev/cd0 .Ed .Sh SPECIAL MAPS Special maps have names beginning with @@ -318,23 +318,23 @@ the map entry key with the optional map The example above could be rewritten using direct map, by placing this in .Nm : .Bd -literal -offset indent -.Li /- auto_example +/- auto_example .Ed .Pp and this in the .Pa /etc/auto_example map file: .Bd -literal -offset indent -.Li /example/x -intr,nfsv4 192.168.1.1:/share/example/x -.Li /example/share -fstype=smbfs,-N ://@server/share -.Li /example/cd -fstype=cd9660 :/dev/cd0 +/example/x -intr,nfsv4 192.168.1.1:/share/example/x +/example/share -fstype=smbfs,-N ://@server/share +/example/cd -fstype=cd9660 :/dev/cd0 .Ed .Sh DIRECTORY SERVICES Both .Nm and maps may contain entries consisting of a plus sign and map name: .Bd -literal -offset indent -.Li +auto_master ++auto_master .Ed .Pp Those entries cause
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: uwe Date: Wed Jan 24 12:05:50 UTC 2018 Modified Files: src/usr.sbin/autofs: auto_master.5 Log Message: Try to use proper semantic markup. Fix a few formatting nits. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/autofs/auto_master.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/auto_master.5 diff -u src/usr.sbin/autofs/auto_master.5:1.4 src/usr.sbin/autofs/auto_master.5:1.5 --- src/usr.sbin/autofs/auto_master.5:1.4 Sun Jan 14 03:17:28 2018 +++ src/usr.sbin/autofs/auto_master.5 Wed Jan 24 12:05:50 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: auto_master.5,v 1.4 2018/01/14 03:17:28 uwe Exp $ +.\" $NetBSD: auto_master.5,v 1.5 2018/01/24 12:05:50 uwe Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -58,28 +58,28 @@ The file consists of lines with two or three entries separated by whitespace and terminated by a newline character: .Bd -literal -offset indent -.Pa mountpoint Pa map_name Op Ar -options +.Ar mountpoint Ar map_name Op Fl Ar options .Ed .Pp -.Pa mountpoint +.Ar mountpoint is either a fully specified path, or -.Li /- . +.Pa /- . When -.Pa mountpoint +.Ar mountpoint is a full path, -.Pa map_name +.Ar map_name must reference an indirect map. Otherwise, -.Pa map_name +.Ar map_name must reference a direct map. See .Sx "MAP SYNTAX" below. .Pp -.Pa map_name +.Ar map_name specifies map to use. If -.Pa map_name +.Ar map_name begins with .Li - , it specifies a special map. @@ -87,7 +87,7 @@ See .Sx "MAP SYNTAX" below. If -.Pa map_name +.Ar map_name is not a fully specified path .Pq it does not start with Li / , .Xr automountd 8 @@ -95,7 +95,7 @@ will search for that name in .Pa /etc . Otherwise it will use the path as given. If the file indicated by -.Pa map_name +.Ar map_name is executable, .Xr automountd 8 will assume it is an executable map. @@ -104,9 +104,9 @@ See below. Otherwise, the file is opened and the contents parsed. .Pp -.Pa -options +.Op Fl Ar options is an optional field that starts with -.Li - +.Fl and can contain generic file system mount options. .Pp The following example specifies that the @@ -120,15 +120,15 @@ indirect map will be mounted on Map files consist of lines with a number of entries separated by whitespace and terminated by newline character: .Bd -literal -offset indent -.Pa key Oo Ar -options Oc Oo Ar mountpoint Oo -options Oc Oc Ar location Op ... +.Ar key Oo Fl Ar options Oc Oo Ar mountpoint Oo Fl Ar options Oc Oc Ar location Op ... .Ed .Pp In most cases, it can be simplified to: .Bd -literal -offset indent -.Pa key Oo Ar -options Oc Ar location +.Ar key Oo Fl Ar options Oc Ar location .Ed .Pp -.Pa key +.Ar key is the path component used by .Xr automountd 8 to find the right map entry to use. @@ -142,27 +142,27 @@ Those directories will not be visible to The .Ar options field, if present, must begin with -.Li - . +.Fl . When mounting the file system, options supplied to .Nm and options specified in the map entry are concatenated together. The special option -.Li fstype +.Ic fstype is used to specify file system type. It is not passed to the mount program as an option. Instead, it is passed as an argument to .Cm "mount -t". The default -.Li fstype +.Ic fstype is .Ql nfs . The special option -.Li nobrowse +.Ic nobrowse is used to disable creation of top-level directories for special and executable maps. .Pp The optional -.Pa mountpoint +.Ar mountpoint field is used to specify multiple mount points for a single key. .Pp The @@ -188,23 +188,23 @@ field may contain references to variable .Pp Defined variables are: .Pp -.Bl -tag -width "-OSNAME" -compact -.It Li ARCH +.Bl -tag -width "Dv OSNAME" -compact +.It Dv ARCH Expands to the output of .Li "uname -p" . -.It Li CPU +.It Dv CPU Same as -.Li ARCH . -.It Li HOST +.Dv ARCH . +.It Dv HOST Expands to the output of .Li "uname -n" . -.It Li OSNAME +.It Dv OSNAME Expands to the output of .Li "uname -s" . -.It Li OSREL +.It Dv OSREL Expands to the output of .Li "uname -r" . -.It Li OSVERS +.It Dv OSVERS Expands to the output of .Li "uname -v" . .El @@ -217,7 +217,7 @@ and .Xr automountd 8 . .Pp To pass a location that begins with -.Li / , +.Pa / , prefix it with a colon. For example, .Li :/dev/cd0 . @@ -231,9 +231,9 @@ referring to the map as described above, will be mounted on .Pa /example/x/ when any process attempts to access that mountpoint, with -.Li intr +.Ic intr and -.Li nfsv4 +.Ic nfsv4 mount options, described in .Xr mount_nfs 8 : .Bd -literal -offset indent @@ -255,25 +255,25 @@ Special maps have names beginning with .Li - . Supported special maps are: .Pp -.Bl -tag -width "-hosts" -compact -.It Li -hosts +.Bl -tag -width ".Ic -noauto"
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: christos Date: Mon Jan 15 14:38:06 UTC 2018 Modified Files: src/usr.sbin/autofs: automount.c Log Message: avoid passing literal string to unconst. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/autofs/automount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/automount.c diff -u src/usr.sbin/autofs/automount.c:1.2 src/usr.sbin/autofs/automount.c:1.3 --- src/usr.sbin/autofs/automount.c:1.2 Sun Jan 14 19:46:16 2018 +++ src/usr.sbin/autofs/automount.c Mon Jan 15 09:38:06 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: automount.c,v 1.2 2018/01/15 00:46:16 christos Exp $ */ +/* $NetBSD: automount.c,v 1.3 2018/01/15 14:38:06 christos Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: automount.c,v 1.2 2018/01/15 00:46:16 christos Exp $"); +__RCSID("$NetBSD: automount.c,v 1.3 2018/01/15 14:38:06 christos Exp $"); #include #include @@ -155,6 +155,7 @@ mount_unmount(struct node *root) struct statvfs *mntbuf; struct node *n, *n2; int i, nitems; + static char rootdir[] = "/"; nitems = getmntinfo(, MNT_WAIT); if (nitems <= 0) @@ -192,7 +193,7 @@ mount_unmount(struct node *root) TAILQ_FOREACH(n2, >n_children, n_next) { mount_if_not_already(n2, n->n_map, n->n_options, - "/", mntbuf, nitems); + rootdir, mntbuf, nitems); } } }
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: christos Date: Mon Jan 15 00:46:16 UTC 2018 Modified Files: src/usr.sbin/autofs: automount.c Log Message: sprinkle unconst To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/automount.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/automount.c diff -u src/usr.sbin/autofs/automount.c:1.1 src/usr.sbin/autofs/automount.c:1.2 --- src/usr.sbin/autofs/automount.c:1.1 Mon Jan 8 22:31:15 2018 +++ src/usr.sbin/autofs/automount.c Sun Jan 14 19:46:16 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: automount.c,v 1.1 2018/01/09 03:31:15 christos Exp $ */ +/* $NetBSD: automount.c,v 1.2 2018/01/15 00:46:16 christos Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ * SUCH DAMAGE. */ #include -__RCSID("$NetBSD: automount.c,v 1.1 2018/01/09 03:31:15 christos Exp $"); +__RCSID("$NetBSD: automount.c,v 1.2 2018/01/15 00:46:16 christos Exp $"); #include #include @@ -100,9 +100,9 @@ mount_autofs(const char *from, const cha from, fspath, prefix, options); memset(, 0, sizeof(args)); - args.from = from; - args.master_options = options; - args.master_prefix = prefix; + args.from = __UNCONST(from); + args.master_options = __UNCONST(options); + args.master_prefix = __UNCONST(prefix); error = mount("autofs", fspath, 0, , sizeof(args)); if (error != 0)
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: uwe Date: Sun Jan 14 03:14:46 UTC 2018 Modified Files: src/usr.sbin/autofs: automount.8 Log Message: Fix accidental trailing whitespace. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/autofs/automount.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/automount.8 diff -u src/usr.sbin/autofs/automount.8:1.4 src/usr.sbin/autofs/automount.8:1.5 --- src/usr.sbin/autofs/automount.8:1.4 Sun Jan 14 03:09:47 2018 +++ src/usr.sbin/autofs/automount.8 Sun Jan 14 03:14:46 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: automount.8,v 1.4 2018/01/14 03:09:47 uwe Exp $ +.\" $NetBSD: automount.8,v 1.5 2018/01/14 03:14:46 uwe Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -115,7 +115,7 @@ The command appeared in .Nx 9.0 . .Sh AUTHORS -.An -nosplit +.An -nosplit The .Nm was developed by
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: uwe Date: Sun Jan 14 03:09:47 UTC 2018 Modified Files: src/usr.sbin/autofs: automount.8 Log Message: Vertical space before an example in .Dl To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/usr.sbin/autofs/automount.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/automount.8 diff -u src/usr.sbin/autofs/automount.8:1.3 src/usr.sbin/autofs/automount.8:1.4 --- src/usr.sbin/autofs/automount.8:1.3 Sun Jan 14 02:54:55 2018 +++ src/usr.sbin/autofs/automount.8 Sun Jan 14 03:09:47 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: automount.8,v 1.3 2018/01/14 02:54:55 uwe Exp $ +.\" $NetBSD: automount.8,v 1.4 2018/01/14 03:09:47 uwe Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -94,6 +94,7 @@ Increase verbosity. .Sh EXAMPLES Unmount all file systems mounted by .Xr automountd 8 : +.Pp .Dl Nm Fl u .Sh SEE ALSO .Xr auto_master 5 ,
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: uwe Date: Sun Jan 14 02:54:55 UTC 2018 Modified Files: src/usr.sbin/autofs: automount.8 Log Message: .An -nosplit To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/autofs/automount.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/automount.8 diff -u src/usr.sbin/autofs/automount.8:1.2 src/usr.sbin/autofs/automount.8:1.3 --- src/usr.sbin/autofs/automount.8:1.2 Tue Jan 9 09:39:07 2018 +++ src/usr.sbin/autofs/automount.8 Sun Jan 14 02:54:55 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: automount.8,v 1.2 2018/01/09 09:39:07 wiz Exp $ +.\" $NetBSD: automount.8,v 1.3 2018/01/14 02:54:55 uwe Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -114,6 +114,7 @@ The command appeared in .Nx 9.0 . .Sh AUTHORS +.An -nosplit The .Nm was developed by
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: christos Date: Sat Jan 13 12:36:35 UTC 2018 Modified Files: src/usr.sbin/autofs: log.c Log Message: add more __dead/EXIT_FAILURE To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/autofs/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/log.c diff -u src/usr.sbin/autofs/log.c:1.2 src/usr.sbin/autofs/log.c:1.3 --- src/usr.sbin/autofs/log.c:1.2 Fri Jan 12 12:54:36 2018 +++ src/usr.sbin/autofs/log.c Sat Jan 13 07:36:35 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: log.c,v 1.2 2018/01/12 17:54:36 christos Exp $ */ +/* $NetBSD: log.c,v 1.3 2018/01/13 12:36:35 christos Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ * */ #include -__RCSID("$NetBSD: log.c,v 1.2 2018/01/12 17:54:36 christos Exp $"); +__RCSID("$NetBSD: log.c,v 1.3 2018/01/13 12:36:35 christos Exp $"); #include #include @@ -101,14 +101,14 @@ log_common(int priority, int log_errno, if (ret < 0) { fprintf(stderr, "%s: snprintf failed", getprogname()); syslog(LOG_CRIT, "snprintf failed"); - exit(1); + exit(EXIT_FAILURE); } ret = strnvis(msgbuf_strvised, sizeof(msgbuf_strvised), msgbuf, VIS_NL); if (ret < 0) { fprintf(stderr, "%s: strnvis failed", getprogname()); syslog(LOG_CRIT, "strnvis failed"); - exit(1); + exit(EXIT_FAILURE); } if (log_errno == -1) { @@ -150,7 +150,7 @@ log_common(int priority, int log_errno, } } -void +__dead void log_err(int eval, const char *fmt, ...) { va_list ap; @@ -162,7 +162,7 @@ log_err(int eval, const char *fmt, ...) exit(eval); } -void +__dead void log_errx(int eval, const char *fmt, ...) { va_list ap;
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: christos Date: Fri Jan 12 17:54:36 UTC 2018 Modified Files: src/usr.sbin/autofs: log.c Log Message: missing printflike To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/log.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/log.c diff -u src/usr.sbin/autofs/log.c:1.1 src/usr.sbin/autofs/log.c:1.2 --- src/usr.sbin/autofs/log.c:1.1 Mon Jan 8 22:31:15 2018 +++ src/usr.sbin/autofs/log.c Fri Jan 12 12:54:36 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: log.c,v 1.1 2018/01/09 03:31:15 christos Exp $ */ +/* $NetBSD: log.c,v 1.2 2018/01/12 17:54:36 christos Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ * */ #include -__RCSID("$NetBSD: log.c,v 1.1 2018/01/09 03:31:15 christos Exp $"); +__RCSID("$NetBSD: log.c,v 1.2 2018/01/12 17:54:36 christos Exp $"); #include #include @@ -89,7 +89,7 @@ log_set_peer_addr(const char *addr) peer_addr = checked_strdup(addr); } -static void +static __printflike(3, 0) void log_common(int priority, int log_errno, const char *fmt, va_list ap) { static char msgbuf[MSGBUF_LEN];
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: christos Date: Thu Jan 11 13:44:26 UTC 2018 Modified Files: src/usr.sbin/autofs: automountd.c Log Message: sprinkle __dead, use EXIT_{SUCCESS,FAILURE} To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/automountd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/automountd.c diff -u src/usr.sbin/autofs/automountd.c:1.1 src/usr.sbin/autofs/automountd.c:1.2 --- src/usr.sbin/autofs/automountd.c:1.1 Mon Jan 8 22:31:15 2018 +++ src/usr.sbin/autofs/automountd.c Thu Jan 11 08:44:26 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: automountd.c,v 1.1 2018/01/09 03:31:15 christos Exp $ */ +/* $NetBSD: automountd.c,v 1.2 2018/01/11 13:44:26 christos Exp $ */ /*- * Copyright (c) 2017 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ * */ #include -__RCSID("$NetBSD: automountd.c,v 1.1 2018/01/09 03:31:15 christos Exp $"); +__RCSID("$NetBSD: automountd.c,v 1.2 2018/01/11 13:44:26 christos Exp $"); #include #include @@ -163,7 +163,7 @@ exit_callback(void) done(EIO, true); } -static void +__dead static void handle_request(const struct autofs_daemon_request *adr, char *cmdline_options, bool incomplete_hierarchy) { @@ -262,7 +262,7 @@ handle_request(const struct autofs_daemo /* * Exit without calling exit_callback(). */ - quick_exit(0); + quick_exit(EXIT_SUCCESS); } /* @@ -288,7 +288,7 @@ handle_request(const struct autofs_daemo /* * Exit without calling exit_callback(). */ - quick_exit(0); + quick_exit(EXIT_SUCCESS); } log_debugx("found node defined at %s:%d; it is a mountpoint", @@ -362,7 +362,7 @@ handle_request(const struct autofs_daemo /* * Exit without calling exit_callback(). */ - quick_exit(0); + quick_exit(EXIT_SUCCESS); } static void @@ -424,13 +424,13 @@ wait_for_children(bool block) return num; } -static void +__dead static void usage_automountd(void) { - fprintf(stderr, "usage: automountd [-D name=value][-m maxproc]" - "[-o opts][-Tidv]\n"); - exit(1); + fprintf(stderr, "Usage: %s [-D name=value][-m maxproc]" + "[-o opts][-Tidv]\n", getprogname()); + exit(EXIT_FAILURE); } static int @@ -531,7 +531,7 @@ main_automountd(int argc, char **argv) if (daemon(0, 0) == -1) { log_warn("cannot daemonize"); pidfile_clean(); - exit(1); + exit(EXIT_FAILURE); } } else { lesser_daemon(); @@ -597,5 +597,5 @@ main_automountd(int argc, char **argv) pidfile_clean(); - return 0; + return EXIT_SUCCESS; }
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: wiz Date: Tue Jan 9 09:39:07 UTC 2018 Modified Files: src/usr.sbin/autofs: automount.8 automountd.8 autounmountd.8 Log Message: File system police. Sort options. Add RCS Id. Use more markup. Wording. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/automount.8 \ src/usr.sbin/autofs/automountd.8 src/usr.sbin/autofs/autounmountd.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/automount.8 diff -u src/usr.sbin/autofs/automount.8:1.1 src/usr.sbin/autofs/automount.8:1.2 --- src/usr.sbin/autofs/automount.8:1.1 Tue Jan 9 03:31:15 2018 +++ src/usr.sbin/autofs/automount.8 Tue Jan 9 09:39:07 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: automount.8,v 1.1 2018/01/09 03:31:15 christos Exp $ +.\" $NetBSD: automount.8,v 1.2 2018/01/09 09:39:07 wiz Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -41,13 +41,9 @@ .Nd update autofs mounts .Sh SYNOPSIS .Nm +.Op Fl cfLuv .Op Fl D Ar name=value -.Op Fl L -.Op Fl c -.Op Fl f .Op Fl o Ar options -.Op Fl v -.Op Fl u .Sh DESCRIPTION When called without options, the .Nm @@ -56,13 +52,19 @@ command parses the configuration file and any direct maps that it references, and mounts or unmounts .Xr autofs 5 -filesystems to match. +file systems to match. These options are available: .Bl -tag -width ".Fl v" +.It Fl c +Flush caches, discarding possibly stale information obtained from maps +and directory services. .It Fl D Define a variable. It is only useful with .Fl L . +.It Fl f +Force unmount, to be used with +.Fl u . .It Fl L Do not mount or unmount anything. Instead parse @@ -71,23 +73,17 @@ and any direct maps, then print them to When specified more than once, all the maps, including indirect ones, will be parsed and shown. This is useful when debugging configuration problems. -.It Fl c -Flush caches, discarding possibly stale information obtained from maps -and directory services. -.It Fl f -Force unmount, to be used with -.Fl u . .It Fl o Specify mount options to be used along with the ones specified in the maps. It is only useful with .Fl L . .It Fl u -Try to unmount filesystems mounted by +Try to unmount file systems mounted by .Xr automountd 8 . .Xr autofs 5 mounts are not unmounted. To unmount all -.Xr autofs +.Xr autofs 5 mounts, use .Cm "umount -At autofs". .It Fl v @@ -96,12 +92,12 @@ Increase verbosity. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES -Unmount all filesystems mounted by +Unmount all file systems mounted by .Xr automountd 8 : .Dl Nm Fl u .Sh SEE ALSO -.Xr autofs 5 , .Xr auto_master 5 , +.Xr autofs 5 , .Xr automountd 8 , .Xr autounmountd 8 .Sh HISTORY @@ -122,7 +118,9 @@ The .Nm was developed by .An Edward Tomasz Napierala Aq Mt tr...@freebsd.org -under sponsorship from the FreeBSD Foundation. +under sponsorship from the +.Fx +Foundation. .Pp The .Nm Index: src/usr.sbin/autofs/automountd.8 diff -u src/usr.sbin/autofs/automountd.8:1.1 src/usr.sbin/autofs/automountd.8:1.2 --- src/usr.sbin/autofs/automountd.8:1.1 Tue Jan 9 03:31:15 2018 +++ src/usr.sbin/autofs/automountd.8 Tue Jan 9 09:39:07 2018 @@ -1,3 +1,5 @@ +.\" $NetBSD: automountd.8,v 1.2 2018/01/09 09:39:07 wiz Exp $ +.\" .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -40,31 +42,31 @@ .Nd daemon handling autofs mount requests .Sh SYNOPSIS .Nm +.Op Fl div .Op Fl D Ar name=value -.Op Fl i .Op Fl m Ar maxproc .Op Fl o Ar options -.Op Fl d -.Op Fl v .Sh DESCRIPTION The .Nm daemon is responsible for handling .Xr autofs 5 mount requests, parsing maps, -and mounting filesystems they specify. +and mounting file systems they specify. On startup, .Nm forks into background and waits for kernel requests. When a request is received, .Nm forks a child process. -The child process parses the appropriate map and mounts filesystems accordingly. +The child process parses the appropriate map and mounts file systems accordingly. Then it signals the kernel to release blocked processes that were waiting for the mount. .Bl -tag -width ".Fl v" .It Fl D Define a variable. +.It Fl d +Debug mode: increase verbosity and do not daemonize. .It Fl i For indirect mounts, only create subdirectories if there are no wildcard entries. @@ -79,8 +81,6 @@ Limit the number of forked .Nm processes, and thus the number of mount requests being handled in parallel. The default is 30. -.It Fl d -Debug mode: increase verbosity and do not daemonize. .It Fl o Ar options Specify mount options. Options specified here will be overridden by options entered in maps or @@ -91,9 +91,8 @@ Increase verbosity. .Sh EXIT STATUS .Ex -std .Sh SEE ALSO -.Xr autofs 5 , .Xr auto_master 5 , -.Xr
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: wiz Date: Tue Jan 9 09:33:00 UTC 2018 Modified Files: src/usr.sbin/autofs: auto_master.5 Log Message: Mostly formatting improvements. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/usr.sbin/autofs/auto_master.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/auto_master.5 diff -u src/usr.sbin/autofs/auto_master.5:1.2 src/usr.sbin/autofs/auto_master.5:1.3 --- src/usr.sbin/autofs/auto_master.5:1.2 Tue Jan 9 09:27:41 2018 +++ src/usr.sbin/autofs/auto_master.5 Tue Jan 9 09:33:00 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: auto_master.5,v 1.2 2018/01/09 09:27:41 wiz Exp $ +.\" $NetBSD: auto_master.5,v 1.3 2018/01/09 09:33:00 wiz Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -56,7 +56,7 @@ daemon. The .Nm file consists of lines with two or three entries separated by whitespace -and terminated by newline character: +and terminated by a newline character: .Bd -literal -offset indent .Pa mountpoint Pa map_name Op Ar -options .Ed @@ -92,7 +92,7 @@ is not a fully specified path .Pq it does not start with Li / , .Xr automountd 8 will search for that name in -.Li /etc . +.Pa /etc . Otherwise it will use the path as given. If the file indicated by .Pa map_name @@ -109,8 +109,10 @@ is an optional field that starts with .Li - and can contain generic file system mount options. .Pp -The following example specifies that the /etc/auto_example indirect map -will be mounted on /example. +The following example specifies that the +.Pa /etc/auto_example +indirect map will be mounted on +.Pa /example . .Bd -literal -offset indent /example auto_example .Ed @@ -135,8 +137,7 @@ A wildcard .Pq Ql * can be used for the key. It matches every directory that does not match other keys. -Those directories will not be visible to the user -until accessed. +Those directories will not be visible to the user until accessed. .Pp The .Ar options @@ -162,8 +163,7 @@ and executable maps. .Pp The optional .Pa mountpoint -field is used to specify multiple mount points -for a single key. +field is used to specify multiple mount points for a single key. .Pp The .Ar location @@ -193,7 +193,8 @@ Defined variables are: Expands to the output of .Li "uname -p" . .It Li CPU -Same as ARCH. +Same as +.Li ARCH . .It Li HOST Expands to the output of .Li "uname -n" . @@ -260,7 +261,7 @@ Query the remote NFS server and map expo This map is traditionally mounted on .Pa /net . Access to files on a remote NFS server is provided through the -.Pf /net/ Ar nfs-server-ip Ns / Ns Ar share-name Ns/ +.Pf /net/ Ar nfs-server-ip Ns / Ns Ar share-name Ns / directory without any additional configuration. Directories for individual NFS servers are not present until the first access, when they are automatically created. @@ -320,8 +321,8 @@ The example above could be rewritten usi .Li /- auto_example .Ed .Pp -and this in -.Li /etc/auto_example +and this in the +.Pa /etc/auto_example map file: .Bd -literal -offset indent .Li /example/x -intr,nfsv4 192.168.1.1:/share/example/x @@ -391,5 +392,7 @@ and by .An Tomohiro Kusumi Aq Mt kusumi.tomoh...@gmail.com . .Sh BUGS -The -media special map is currently unsupported on +The +.Li -media +special map is currently unsupported on .Nx .
CVS commit: src/usr.sbin/autofs
Module Name:src Committed By: wiz Date: Tue Jan 9 09:27:41 UTC 2018 Modified Files: src/usr.sbin/autofs: auto_master.5 Log Message: file system police. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/usr.sbin/autofs/auto_master.5 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.sbin/autofs/auto_master.5 diff -u src/usr.sbin/autofs/auto_master.5:1.1 src/usr.sbin/autofs/auto_master.5:1.2 --- src/usr.sbin/autofs/auto_master.5:1.1 Tue Jan 9 03:31:15 2018 +++ src/usr.sbin/autofs/auto_master.5 Tue Jan 9 09:27:41 2018 @@ -1,4 +1,4 @@ -.\" $NetBSD: auto_master.5,v 1.1 2018/01/09 03:31:15 christos Exp $ +.\" $NetBSD: auto_master.5,v 1.2 2018/01/09 09:27:41 wiz Exp $ .\" Copyright (c) 2017 The NetBSD Foundation, Inc. .\" Copyright (c) 2016 The DragonFly Project .\" Copyright (c) 2014 The FreeBSD Foundation @@ -42,7 +42,7 @@ .Sh DESCRIPTION The automounter configuration consists of the .Nm -configuration file, which assigns filesystem paths to map names, +configuration file, which assigns file system paths to map names, and maps, which contain actual mount information. The .Nm @@ -107,7 +107,7 @@ Otherwise, the file is opened and the co .Pa -options is an optional field that starts with .Li - -and can contain generic filesystem mount options. +and can contain generic file system mount options. .Pp The following example specifies that the /etc/auto_example indirect map will be mounted on /example. @@ -142,12 +142,12 @@ The .Ar options field, if present, must begin with .Li - . -When mounting the filesystem, options supplied to +When mounting the file system, options supplied to .Nm and options specified in the map entry are concatenated together. The special option .Li fstype -is used to specify filesystem type. +is used to specify file system type. It is not passed to the mount program as an option. Instead, it is passed as an argument to .Cm "mount -t". @@ -167,7 +167,7 @@ for a single key. .Pp The .Ar location -field specifies the filesystem to be mounted. +field specifies the file system to be mounted. Ampersands .Pq Ql & in the @@ -265,10 +265,10 @@ directory without any additional configu Directories for individual NFS servers are not present until the first access, when they are automatically created. .It Li -media -Query devices that are not yet mounted, but contain valid filesystems. +Query devices that are not yet mounted, but contain valid file systems. Generally used to access files on removable media. .It Li -noauto -Mount filesystems configured in +Mount file systems configured in .Xr fstab 5 as "noauto". This needs to be set up as a direct map. @@ -378,7 +378,9 @@ The .Nm configuration file functionality was developed by .An Edward Tomasz Napierala Aq Mt tr...@freebsd.org -under sponsorship from the FreeBSD Foundation. +under sponsorship from the +.Fx +Foundation. .Pp The .Nm