action_test.c revision 18c2aff776a775d34a4c9893a4c72e0434d68e36
/*
* 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 (c) 1995 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
extern char *prog_name; /* in rmmount */
int
{
int c;
int i;
char *action;
char *path;
char *usertty;
char *device;
char *name;
char *user;
int yes = 0;
int no = 0;
int pau = 0;
/* change our prog's idea of it's name */
/*
* print all the args out
*/
for (i = 0; i < argc; i++) {
}
/* process arguments */
switch (c) {
case 'n':
no++;
break;
case 'y':
yes++;
break;
case 'p':
pau++;
break;
default:
return (-1);
}
}
} else {
(void) printf("VOLUME_ACTION undefined\n");
}
} else {
(void) printf("VOLUME_PATH undefined\n");
}
} else {
(void) printf("VOLUME_USERTTY undefined\n");
}
} else {
(void) printf("VOLUME_DEVICE undefined\n");
}
} else {
(void) printf("VOLUME_NAME undefined\n");
}
} else {
(void) printf("VOLUME_USER undefined\n");
}
if (pau) {
(int) pause();
}
if (no) {
return (1);
}
if (yes) {
return (0);
}
return (128);
}