/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
*/
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
char **listbuf;
char *whoami;
static void fixmntent();
static void mnterror();
static void usage(char *);
static int oneof();
static int quotaonoff();
extern int optind;
extern char *optarg;
int
{
char **listp;
int listcnt;
int offmode = 0;
int listmax = 0;
int errs = 0;
int status;
int opt;
if (whoami == (char *)1)
offmode++;
whoami);
}
}
switch (opt) {
case 'v':
vflag++;
break;
case 'a':
aflag++;
break;
case 'V': /* Print command line */
{
char *opt_text;
int opt_cnt;
if (opt_text)
opt_text);
}
}
break;
case '?':
}
}
}
/*
* If aflag go through vfstab and make a list of appropriate
* filesystems.
*/
if (aflag) {
listcnt = 0;
}
(vfsbuf.vfs_mntopts == 0) ||
continue;
listp++;
listcnt++;
/* grow listbuf if needed */
sizeof (char *) * listmax);
"Can't grow listbuf.\n");
}
}
}
*listp = (char *)0;
} else {
}
/*
* Open real mnttab
*/
}
/* check every entry for validity before we change mnttab */
;
if (status > 0)
/*
* Loop through mnttab, if a file system gets turned on or off
* do the quota call.
*/
}
}
while (listcnt--) {
if (*listp) {
errs++;
}
listp++;
}
if (errs > 0)
errs += 31;
return (errs);
}
int
{
if (offmode) {
goto bad;
if (vflag)
} else {
0)
goto bad;
if (vflag)
}
return (0);
bad:
return (1);
}
int
{
int n = on;
while (n--) {
*listp = (char *)0;
return (1);
}
listp++;
}
return (0);
}
void
{
}
int
{
int fd;
int status;
return (-1);
}
return (-1);
}
perror("open");
}
return (status);
}
char *
{
char *f, *opts;
static char *tmpopts;
if (tmpopts == 0) {
if (tmpopts == 0)
return (0);
}
}
return (NULL);
}
void
{
switch (flag) {
case MNT_TOOLONG:
break;
case MNT_TOOFEW:
whoami);
break;
case MNT_TOOMANY:
whoami);
break;
}
exit(1);
}