/*
* 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
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <locale.h>
#include <fslib.h>
#include <stdio.h>
#include <poll.h>
static int nmflg = 0;
static int qflg = 0;
static boolean_t
{
return (B_FALSE);
break;
}
}
return (found);
}
int
{
/* mount information */
char *special;
char *mountp;
int c;
char *myname;
extern int optind;
extern char *optarg;
int error = 0;
int verbose = 0;
int mflg = 0;
int optcnt = 0;
int optsize = 0;
char *saveoptbuf;
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
optbuf[0] = '\0';
switch (c) {
case 'V':
verbose++;
break;
case '?':
error++;
break;
case 'm':
nmflg++;
break;
case 'O':
mflg |= MS_OVERLAY;
break;
case 'o':
if (verbose)
break;
case 'q':
qflg++;
break;
}
}
char *optptr;
if (optptr)
}
}
gettext("Usage: %s [-o size] swap mount_point\n"),
typename);
exit(32);
}
mflg |= MS_OPTIONSTR;
if (verbose) {
if (optsize)
else
}
if (optsize) {
"mount");
exit(1);
}
}
optbuf, MAX_MNTOPT_STR)) {
/*
* Because of bug 6176743, any attempt to mount
* tmpfs filesystem could fail for reasons
* described in that bug. We're trying to detect
* that situation here by checking that the filesystem
* When that bug is fixed, this code can be removed.
*/
goto again;
}
"%s: %s is already mounted or %s is busy\n"),
} else {
perror("mount");
}
exit(32);
}
return (0);
}