/*
* 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 2004 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 <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdarg.h>
#include "tmstruct.h"
#include "ttymon.h"
/*
* ttyadm - format ttymon specific information and
* print it to stdout
*
* Usage: ttyadm [options] -d device -s service -l ttylabel
* ttyadm -V
*
* valid options are:
* -c
* -h
* -b
* -I
* -S y|n
* -T term
* -r count
* -t timeout
* -p prompt
* -m modules
* -i msg
*/
static void usage();
static int check_label();
extern int check_device();
extern int check_cmd();
extern int vml();
int
{
int c; /* option letter */
extern void copystr();
extern char *optarg;
extern int optind;
extern int strcheck();
if (argc == 1)
usage();
exit(1);
}
ttyflags[0] = '\0';
switch (c) {
case 'V':
usage();
exit(0);
break; /*NOTREACHED*/
case 'd':
dflag = 1;
break;
case 'c':
break;
case 'h':
break;
case 'b':
break;
case 'I':
break;
case 'r':
"Invalid argument for \"-r\" -- positive number expected.\n");
usage();
}
break;
case 'T':
break;
case 'S':
switch (*optarg) {
case 'Y':
case 'y':
break;
case 'N':
case 'n':
break;
default:
usage();
}
break;
case 's':
sflag = 1;
break;
case 't':
"Invalid argument for \"-t\" -- positive number expected.\n");
usage();
}
break;
case 'l':
lflag = 1;
break;
case 'm':
mflag = 1;
break;
case 'p':
break;
case 'i':
break;
case '?':
usage();
break;
}
}
usage();
usage();
errflg++;
errflg++;
errflg++;
errflg++;
if (errflg)
exit(1);
return (0);
}
/*
* usage - print out a usage message
*/
static void
usage()
{
exit(1);
}
/*
* - otherwise, return -1
*/
static int
char *ttylabel;
{
extern int find_label();
return(-1);
}
(void)fprintf(stderr, "error -- \"%s\" does not exist, can't verify ttylabel <%s>\n", TTYDEFS, ttylabel);
return(-1);
}
return(0);
}
return(-1);
}
/*
* log - print a message to stderr
*/
void
{
}