/*
* 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.
*/
/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* University Copyright- Copyright (c) 1982, 1986, 1988
* The Regents of the University of California
* All Rights Reserved
*
* University Acknowledgment- Portions of this document are derived from
* software developed by the University of California, Berkeley, and its
* contributors.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* libfstyp module for ufs
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <locale.h>
#include <fcntl.h>
#include <errno.h>
#include <strings.h>
#include <sys/inttypes.h>
#include <libfstyp_module.h>
typedef struct fstyp_ufs {
int fd;
union {
} fsun;
union {
} cgun;
} fstyp_ufs_t;
static int is_ufs(fstyp_ufs_t *h);
static int get_attr(fstyp_ufs_t *h);
int
{
struct fstyp_ufs *h;
if (offset != 0) {
return (FSTYP_ERR_OFFSET);
}
return (FSTYP_ERR_NOMEM);
}
*handle = (fstyp_mod_handle_t)h;
return (0);
}
void
{
nvlist_free(h->attr);
}
free(h);
}
int
{
return (is_ufs(h));
}
int
{
int error;
return (FSTYP_ERR_NOMEM);
}
nvlist_free(h->attr);
return (error);
}
}
return (0);
}
int
{
}
static int
{
return (FSTYP_ERR_IO);
}
return (FSTYP_ERR_NO_MATCH);
}
return (FSTYP_ERR_NO_MATCH);
}
return (FSTYP_ERR_NO_MATCH);
}
return (0);
}
return (FSTYP_ERR_NOMEM); \
}
return (FSTYP_ERR_NOMEM); \
}
return (FSTYP_ERR_NOMEM); \
}
static int
{
char s[128];
time_t t;
ADD_STRING(h, "format",
ADD_STRING(h, "time", s);
ADD_STRING(h, "optim",
(void) snprintf(s, sizeof (s), "%s%s",
ADD_STRING(h, "fs_reclaim", s);
}
} else {
}
ADD_STRING(h, "gen_version", s);
return (0);
}
static int
{
time_t t;
ctime(&t));
"sbsize\t%d\tcgsize\t%d\tcgoffset %d\tcgmask\t0x%08x\n",
"csaddr\t%d\tcssize\t%d\tshift\t%d\tmask\t0x%08x\n",
} else {
}
"file system state is valid, fsclean is %d\n"),
} else {
gettext("file system state is not valid\n"));
}
"blocks available in each rotational position"));
} else {
"insufficient space to maintain rotational tables\n"));
}
for (i = 0; i < nrpos; i++) {
continue;
/*CSTYLED*/
if (k % 12 == 0)
break;
}
}
}
/* void * cast is to convince lint that sip really is aligned */
return (FSTYP_ERR_IO);
}
}
if (i && i % 4 == 0)
}
}
return (0);
}
static void
{
*sp = 0;
while (nb--)
}
static int
{
return (0);
}
return (1);
}
/* ARGSUSED */
static void
{
int i;
long tb = 0;
else
"dumplog: error reading log allocation\n"));
return;
}
"\tphysical block\t%" PRId32
}
"dumplog: error reading log state\n"));
return;
}
else
else
}
/* ARGSUSED */
static void
{
int i, j;
time_t t;
return;
}
if (!cg_chkmagic(cgp))
"Invalid Cylinder grp magic fffs:%x 4.2 fs:%x\n"),
/* print FFFS 4.3 cyl grp format. */
"cgx\t%d\tncyl\t%d\tniblk\t%d\tndblk\t%d\n",
"nbfree\t%d\tndir\t%d\tnifree\t%d\tnffree\t%d\n",
}
gettext("\nsum of frsum: %d\niused:\t"), j);
}
/* print Old cyl grp format. */
"cgx\t%d\tncyl\t%d\tniblk\t%d\tndblk\t%d\n",
"nbfree\t%d\tndir\t%d\tnifree\t%d\tnffree\t%d\n",
"rotor\t%d\tirotor\t%d\tfrotor\t%d\nfrsum",
}
gettext("\nsum of frsum: %d\niused:\t"), j);
for (j = 0; j < NRPOS; j++)
}
}
}
static void
{
int i;
int count = 0, j;
unsigned char *cp = (unsigned char *)p;
for (i = 0; i < max; i++) {
if (count)
count++;
j = i;
i++;
if (i != j)
}
}
}