Deleted Added
full compact
1.\" Copyright (c) 1994
2.\" The Regents of the University of California. All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\" notice, this list of conditions and the following disclaimer.

--- 26 unchanged lines hidden (view full) ---

35.Dt GETMNTOPTS 3
36.Os BSD 4.4
37.Sh NAME
38.Nm getmntopts
39.Nd scan mount options
40.Sh SYNOPSIS
41.Fd #include <mntopts.h>
42.Ft void
43.Fn getmntopts "char *options" "struct mntopt *mopts" "int *flagp"
44.Sh DESCRIPTION
45The
46.Nm getmntopts
47function takes a comma separated option list and a list
48of valid option names, and computes the bitmask
49corresponding to the requested set of options.
50.Pp
51The string
52.Dv options
53is broken down into a sequence of comma separated tokens.
54Each token is looked up in the table described by
55.Dv mopts
56and the bits in
57the word referenced by
58.Dv flagp
59are updated.
60The flag word is not initialized by
61.Nm getmntopt .
62The table,
63.Dv mopts ,
64has the following format:
65.Bd -literal
66struct mntopt {
67 char *m_option; /* option name */
68 int m_inverse; /* is this a negative option, eg "dev" */
69 int m_flag; /* bit to set, eg MNT_RDONLY */
70};
71.Ed
72.Pp
73The members of this structure are:
74.Bl -tag -width m_inverse
75.It Fa m_option
76the option name,
77for example

--- 17 unchanged lines hidden (view full) ---

95the flag word when the option is recognized.
96The bit is set when the option is discovered,
97but cleared if the option name was preceded
98by the letters
99.Dq no .
100The
101.Dv m_inverse
102flag causes these two operations to be reversed.
103.El
104.Pp
105Each of the user visible
106.Dv MNT_
107flags has a corresponding
108.Dv MOPT_
109macro which defines an appropriate
110.Li "struct mntopt"

--- 53 unchanged lines hidden ---