mount.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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 2003 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <locale.h>
#include <stdio.h>
#include <time.h>
#include <signal.h>
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <fslib.h>
extern int daylight;
/*
* use (see PSARC/1996/443), which is why it is not in the usage message.
*/
static int roflag = 0;
static int optsize = 0;
int
{
char *mnt_special;
char *mnt_mountp;
int c;
char *myname;
char typename[64];
char *savedoptbuf;
extern int optind;
extern char *optarg;
int error = 0;
int verbose = 0;
int mflg = 0;
int qflg = 0;
int optcnt = 0;
switch (c) {
case 'V':
case 'v':
verbose++;
break;
case '?':
error++;
break;
case 'r':
roflag++;
break;
case 'm':
mflg |= MS_NOMNTTAB;
break;
case 'o':
sizeof (optbuf)) {
gettext("%s: Invalid argument: %s\n"),
return (2);
}
break;
case 'O':
mflg |= MS_OVERLAY;
break;
case 'q':
qflg = 1;
break;
}
}
char *optptr;
if (optptr)
}
}
/*
* don't hint at options yet (none are really supported)
*/
"Usage: %s [generic options] [-o suboptions] "
"special mount_point\n"), typename);
"\tpcfs-specific suboptions are:\n"
"\t foldcase,nofoldcase\n"));
exit(32);
}
(void) tzset();
if (roflag)
myname);
exit(2);
}
if (verbose) {
}
"mount: %s is already mounted or %s is busy\n"),
"mount: %s is not a DOS filesystem.\n"),
} else {
perror("mount");
}
exit(32);
}
return (0);
}