/*
* 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 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 */
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <limits.h>
#include <errno.h>
#include <stdarg.h>
#include <locale.h>
#define NEWARG()\
extern char *default_fstype();
int
{
char cc;
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
NEWARG();
NEWARG();
NEWARG();
NEWARG();
NEWARG();
NEWARG();
++argv;
--argc;
NEWARG();
}
NEWARG();
++argv;
--argc;
NEWARG();
}
NEWARG();
++argv;
--argc;
NEWARG();
}
NEWARG();
++argv;
--argc;
NEWARG();
}
NEWARG();
++argv;
--argc;
NEWARG();
}
Vflg++;
if (Fflg)
perr("volcopy: More than one"
"FSType specified.\n"
"Usage:\nvolcopy [-F FSType] [-V]"
" [current_options] [-o "
"specific_options] operands\n");
Fflg++;
++argv;
--argc;
if (argc == 1)
perr("Usage:\nvolcopy [-F FSType] [-V]"
" [current_options] [-o "
"specific_options] operands\n");
} else
perr("volcopy: FSType %s exceeds %d"
NEWARG();
++argv;
--argc;
NEWARG();
}
perr("volcopy: FSType %s exceeds %d "
"characters.\nUsage:\nvolcopy "
"[-F FSType] [-V] [current_options] "
"[-o specific_options] "
NEWARG();
if (Fflg) {
} else {
perr("Usage:\nvolcopy [-F FSType] [-V] "
"[current_options] [-o "
"specific_options] operands\n");
}
} else
perr("<%s> invalid option\nUsage:\n"
"volcopy [-F FSType] [-V] "
"[current_options] [-o "
++argv;
--argc;
} /* argv[1][0] == '-' */
perr("Usage:\nvolcopy [-F FSType] [-V] "
"[current_options] [-o "
"specific_options] operands\n");
perr("volcopy: too many arguments.\n");
if (ii == -1) {
}
switch (ii) {
case -1:
break;
case 0:
break;
case VFS_TOOLONG:
perr("volcopy: line in vfstab exceeds "
break;
case VFS_TOOFEW:
perr("volcopy: line in vfstab has too few entries\n");
break;
case VFS_TOOMANY:
perr("volcopy: line in vfstab has too many entries\n");
break;
default:
break;
}
}
if (Vflg) {
printf("\n");
exit(0);
}
return (0);
}
static void
{
/* build the full pathname of the fstype dependent command. */
/* set the new argv[0] to the filename */
/* Try to exec the fstype dependent portion of the mount. */
perr("volcopy: cannot execute %s"
" - permission denied\n", full_path);
exit(1);
}
nargv[0] = "sh";
}
exit(1);
}
/*
* perr: Print error messages.
*/
static int
{
exit(1);
return (0);
}