/*
* Copyright 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/*
* Copyright (c) 1980, 1986, 1990 The Regents of the University of California.
* All rights reserved.
*
* Redistribution and use in source and binary forms are permitted
* provided that: (1) source distributions retain this entire copyright
* notice and comment, and (2) distributions including binaries display
* the following acknowledgement: ``This product includes software
* developed by the University of California, Berkeley and its contributors''
* in the documentation or other materials provided with the distribution
* and in all advertising materials mentioning features or use of this
* software. Neither the name of the University nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#define DKTYPENAMES
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <ustat.h>
#include <errno.h>
#include <sys/sysmacros.h>
#include <sys/int_const.h>
#include <string.h>
#include <locale.h>
#include "fsck.h"
extern void errexit(char *, ...);
extern void pwarn(char *, ...);
extern void pfatal(char *, ...);
extern void printclean();
extern void bufinit();
extern void ckfini();
static uint32_t get_last_block();
extern char *tagerrs[];
extern int mflag;
extern char hotroot;
char *
{
havesb = 0;
exitstat = 34;
return (0);
}
/*
* A mount point is specified. But the mount point doesn't
* Search mnttab, because if the fs is error locked, it is
* allowed to be fsck'd while mounted.
*/
"character device\n"), dev);
return (0);
}
hotroot++;
"ignored\n"), dev);
exitstat = 33;
return (0);
}
}
/*
* Check vfstab for a mount point with this name
*/
VFSTAB);
}
MNTTYPE_UDFS) != 0) {
/*
* found the entry but it is not a
* udfs filesystem, don't check it
*/
return (0);
}
if (rflag) {
}
goto restat;
}
}
if (preen)
"character device.\n"));
"character device; OK"))
== 0)
return (0);
/*
* To fsck regular files (fs images)
* we need to clear the rflag since
* regular files don't have raw names. --CW
*/
rflag = 0;
}
if (rflag)
mountedfs++;
else {
"device ignored\n"), devstr);
exit(33);
}
sync(); /* call sync, only when devstr's mounted */
}
if (rflag) {
/*
* For root device check, must check
* block devices.
*/
exitstat = 34;
return (0);
}
}
hotroot++;
exitstat = 34;
return (0);
}
fswritefd = -1;
}
if (preen == 0)
(void) printf("\n");
if (hotroot)
(void) printf(" is root fs%s",
if (mountedfs)
(void) printf(" is mounted");
(void) printf(".\n");
}
fsmodified = 0;
if (readvolseq(1) == 0)
return (0);
iscorrupt = 0;
printclean();
return (0);
}
sizeof (struct fileinfo *));
sizeof (struct fileinfo));
goto badsb;
}
bufinit();
return (devstr);
ckfini();
exitstat = 39;
return (0);
}
static int
{
return (0);
}
static int
{
return (0);
}
static int
{
return (0);
}
static int
{
return (0);
}
static int
{
/* LINTED */
if (debug)
part_len);
return (0);
}
static int
{
return (0);
}
static int
{
return (0);
}
/* ARGSUSED */
static int
{
return (0);
}
static int
{
/* LINTED */
return (0);
}
void
{
int i;
long *ptr;
for (i = 0; i < 16; i += 4) {
/* LINTED */
}
}
/*
* Read in the super block and its summary info.
*/
/* ARGSUSED */
static int
{
int err;
long freelen;
disk_size = get_last_block();
if (debug)
/* LINTED */
return (0);
if (debug)
if (err == 0)
break;
}
if (debug)
errexit("cannot allocate space for volume sequences\n");
if (debug)
(void) printf("reading volume sequences "
"(%d bytes at %x and %x)\n",
return (0);
return (0);
/* LINTED */
if (debug) {
}
if (err == 0) {
continue;
}
case UD_PRI_VOL_DESC:
if (debug) {
(void) printf("serial number = %d\n",
}
break;
case UD_ANCH_VOL_DESC:
break;
case UD_VOL_DESC_PTR:
break;
case UD_IMPL_USE_DESC:
break;
case UD_PART_DESC:
break;
case UD_LOG_VOL_DESC:
break;
case UD_UNALL_SPA_DESC:
break;
case UD_TERM_DESC:
goto done;
break;
case UD_LOG_VOL_INT:
break;
default:
}
} else {
}
}
done:
" logical volume descriptor\n"));
return (0);
}
/* Get the logical volume integrity descriptor */
if (debug)
lvintlen);
" volume integrity sequence\n"));
return (0);
}
return (0);
}
if (debug) {
}
if (err) {
return (0);
}
/* Get pointer to implementation use area */
if (debug) {
}
/* Set up free block map and read in the existing free space map */
if (freelen == 0) {
}
return (0);
}
if (freelen) {
/* Mark the partition map blocks busy */
spacep = (struct space_bmap_desc *)
"map\n"));
return (0);
}
part_bmp_sectors * secsize) != 0)
return (0);
if (debug) {
}
if (debug)
(void) printf("err %s tag %x space bitmap at %x"
" length %d nbits %d nbytes %d\n",
if (err) {
"tag = %d\n"),
return (0);
}
}
/* Get the fileset descriptor */
if (debug)
(void) printf("Fileset descriptor at %x for %d bytes\n",
if (!filesetlen) {
return (0);
}
return (0);
}
filesetlen) != 0) {
return (0);
}
if (err) {
return (0);
}
/* Get the address of the root file entry */
if (debug)
havesb = 1;
return (1);
}
{
return (0);
}
return (0);
}
gettext("Could not get the slice information\n"));
return (0);
}
gettext("dki_info.dki_partition > V_NUMPAR\n"));
return (0);
}
}