/*
* 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 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Label a file system volume.
*/
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <locale.h>
#include <errno.h>
#include "ud_lib.h"
typedef unsigned short unicode_t;
static void usage();
"lvinfo1",
"lvinfo2",
"lvinfo3",
NULL};
int
{
#if !defined(TEXT_DOMAIN)
#endif
(void) textdomain(TEXT_DOMAIN);
switch (opt) {
case 'F':
usage();
}
break;
case 'o':
/*
* UDFS specific options
*/
while (*options != '\0') {
&value)) {
case LVINFO1 :
set_flags |= SET_LVINFO1;
(void) convert_string(value,
gettext("udfs labelit: lvinfo1 should be less than "
"36 bytes after converting to compressed unicode "
"dstring\n"));
break;
case LVINFO2 :
set_flags |= SET_LVINFO2;
(void) convert_string(value,
gettext("udfs labelit: lvinfo2 should be less than "
"36 bytes after converting to compressed unicode "
"dstring\n"));
break;
case LVINFO3 :
set_flags |= SET_LVINFO3;
(void) convert_string(value,
gettext("udfs labelit: lvinfo3 should be less than "
"36 bytes after converting to compressed unicode "
"dstring\n"));
break;
default:
usage();
break;
}
}
break;
case '?':
usage();
}
}
/*
* There are restrictions on the
* length of the names
* fsname is 8 characters
* volume name is 32 characters
* The extra byte is for compression id
*/
gettext("udfs labelit: fsname can not be longer than 8 characters\n"));
gettext("udfs labelit: volname can not be longer "
"than 32 bytes after converting to "
"compressed unicode dstring\n"));
} else {
usage();
}
}
gettext("udfs labelit: cannot initialize ud_lib\n"));
exit(1);
}
/*
* Open special device
*/
if (set_flags == 0) {
} else {
}
gettext("udfs labelit: cannot open <%s> errorno <%d>\n"),
exit(1);
}
goto close_dev;
}
ret = 1;
goto close_dev;
}
return (ret);
}
static void
usage()
{
"udfs usage: labelit [-F udfs] [generic options] "
"[ -o specific_options ] special [fsname volume]\n"));
" -o : specific_options : [lvinfo1=string],"
"[lvinfo2=string],[lvinfo3=string]\n"));
gettext("NOTE that all -o suboptions: must"
" be separated only by commas.\n"));
exit(1);
}
static void
{
if (set_flags == 0) {
}
}
return;
} else {
}
}
(SET_FSNAME | SET_VOLNAME)) &&
return;
}
/* LINTED */
}
}
}
static void
{
if (v->pvd_len != 0) {
sizeof (struct pri_vol_desc)) == 0) {
/* LINTED */
(void) ud_convert2local(
gettext("fsname in %s : %s\n"),
(void) ud_convert2local(
gettext("volume label in %s : %s\n"),
}
}
if (v->iud_len != 0) {
sizeof (struct iuvd_desc)) == 0) {
/* LINTED */
(void) ud_convert2local(
gettext("LVInfo1 in %s : %s\n"),
(void) ud_convert2local(
gettext("LVInfo2 in %s : %s\n"),
(void) ud_convert2local(
gettext("LVInfo3 in %s : %s\n"),
}
}
}
/* ARGSUSED */
static void
{
(SET_FSNAME | SET_VOLNAME)) &&
(v->pvd_len)) {
sizeof (struct pri_vol_desc)) == 0) {
/* LINTED */
sizeof (struct pri_vol_desc));
}
}
sizeof (struct iuvd_desc)) == 0) {
/* LINTED */
}
}
}
}
sizeof (struct iuvd_desc));
}
}
(SET_FSNAME | SET_VOLNAME)) &&
(v->lvd_len)) {
sizeof (struct log_vol_desc)) == 0) {
/* LINTED */
sizeof (struct log_vol_desc));
}
}
}
{
exit(1);
}
return (out_length);
}
static int32_t
{
int32_t i = 0;
int32_t j = 0;
uint8_t c = 8;
for (i = 0; i < len; i++) {
if (buf4c[i] & 0xFFFFFF00) {
c = 16;
break;
}
}
comp[0] = c;
j = 1;
if (c == 16) {
}
}
return (j);
}