getlabel.c revision f875b4ebb1dd9fdbeb043557cab38ab3bf7f6e01
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* getlabel - gets file label.
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <locale.h>
#define s_flag 0x04
#define S_flag 0x08
static int
{
char *label;
perror("m_label_alloc");
return (1);
return (1);
}
switch (opt_flag) {
case S_flag:
"Sensitivity label"));
return (2);
}
break;
case s_flag:
"Sensitivity label"));
return (2);
}
break;
default:
"Sensitivity label"));
return (2);
}
break;
}
return (0);
}
void
{
prog);
exit(1);
}
int
{
int rc = 0;
int opt;
char *prog;
#if !defined(TEXT_DOMAIN) /* Should be defined by cc -D */
#endif
(void) textdomain(TEXT_DOMAIN);
else
prog++;
if (argc < 2) {
}
switch (opt) {
case 's':
if (opt_flag != 0)
break;
case 'S':
if (opt_flag != 0)
break;
default:
}
}
}
while (argc-- > 0) {
rc = 2;
}
return (rc);
}