Subject: Re: encrypted swap?
To: Simon Burge <>
From: Simon J. Gerraty <>
List: tech-kern
Date: 06/09/2001 22:22:46
>Here's a cut at adding -o foo=bar support to getmntopts(), by adding a
>MOPT_ASSIGNMENT flag.  Two things:

Looks very similar to what I did for snfsc.  I also added provision for
some args to be simply handed of to another function for processing.
So I have:

struct mntopt {
	const char *m_option;	/* option name */
	int m_optflags;		/* if a negative option, eg "dev" */
	void *m_arg;		/* argument, bit to set,value or string */
#define OPT_NEGATIVE	1
#define OPT_INT		2
#define OPT_STRING	4
#define OPT_FUNC	8

They're a little dated, but I've copied my getmntopts.c and
mntopts.h to ~sjg on if you want to take a look.

BTW I didn't find it necessary to lose the const for m0, perhaps I
didn't have enough gcc switches enabled?