/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <ctype.h>
#include <string.h>
#include <stdio.h>
#include <unistd.h> /* defines F_LOCK for lockf */
#include <stdlib.h> /* for getopt(3) */
#include <signal.h>
#include <locale.h>
#include <fslib.h>
#include <errno.h>
extern int optind;
extern char *optarg;
#define GLOBAL 0
#ifndef MNTOPT_NOGLOBAL
#endif /* MNTOPT_NOGLOBAL */
/*
* Mount options that require special handling
*/
static char *myopts[] = {
};
static void rpterr(char *, char *);
static void usage(void);
int
{
char *gopt;
int c;
int hsfs_flags;
int flags;
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
if (myname)
myname++;
else
/*
* Check for arguments requiring special handling. Ignore
* unrecognized options.
*/
switch (c) {
case 'o':
"%s: option set too long\n"),
myname);
exit(1);
}
"%s: missing suboptions\n"),
myname);
exit(1);
}
while (*options != '\0') {
&value)) {
case GLOBAL:
havegblopt = 1;
global = 1;
break;
case NOGLOBAL:
havegblopt = 1;
global = 0;
break;
}
}
break;
case 'O':
Oflg++;
break;
case 'r':
/* accept for backwards compatibility */
break;
case 'm':
break;
case 'g':
gflg++;
break;
case 'q':
qflg++;
break;
}
}
usage();
/*
* Force readonly. obuff is guaranteed to have something in
* it. We might end up with "ro,ro", but that's acceptable.
*/
myname);
exit(1);
}
/*
* xxx it's not clear if should just put MS_GLOBAL in flags,
* or provide it as a string. Be safe, do both. The subopt
* version has precedence over the switch version.
*/
} else if (havegblopt) {
}
exit(1);
}
}
/*
* Save a copy of the options to compare with the options that
* were actually recognized and supported by the kernel.
*/
/*
* Perform the mount.
*/
}
if (!qflg) {
}
exit(0);
/* NOTREACHED */
}
static void
{
switch (errno) {
case EPERM:
myname);
break;
case ENXIO:
break;
case ENOTDIR:
break;
case ENOENT:
gettext("%s: %s or %s, no such file or directory\n"),
break;
case EINVAL:
break;
case EBUSY:
gettext("%s: %s is already mounted or %s is busy\n"),
break;
case ENOTBLK:
break;
case EROFS:
break;
case ENOSPC:
gettext("%s: %s is corrupted. needs checking\n"),
break;
default:
bs);
}
}
static void
usage()
{
char *opts;
opts = "{-r | -o ro | -o nrr | -o nosuid | -o notraildot | -o nomaplcase}";
exit(32);
}