diskusg.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* 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) 1984, 1986, 1987, 1988, 1989 AT&T */
/* All Rights Reserved */
/* Copyright (c) 1999 by Sun Microsystems, Inc. */
/* All rights reserved. */
#ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.18 */
#include <stdio.h>
#include <sys/sysmacros.h>
#include <pwd.h>
#include <fcntl.h>
#include "acctdef.h"
#ifndef Fs2BLK
#define Fs2BLK 0
#endif
#define NINODE 2048
int VERBOSE = 0;
int index;
struct acct {
long usage;
int igncnt = {0};
char *cmd;
unsigned hash();
int argc;
char **argv;
{
extern int optind;
extern char *optarg;
register c;
register rfd;
case 's':
break;
case 'v':
VERBOSE = 1;
break;
case 'i':
break;
case 'u':
break;
case 'p':
break;
case '?':
errfl++;
break;
}
if(errfl) {
exit(10);
}
hashinit();
} else {
continue;
}
}
}
}
else {
continue;
}
} else {
}
} else {
}
}
}
output();
exit(0);
}
{
long blcks;
}
}
}
char *file;
register fd;
{
register i, j;
if (fd < 0 ) {
return (FAIL);
}
sync();
/* Fake out block size to be 512 */
dev = 512;
/* Read in super-block of filesystem */
/* Check for filesystem names to ignore */
return;
/* Check for size of filesystem to be 512 or 1K */
case Fs1b:
bsize = 512;
inoshift = 3;
break;
case Fs2b:
bsize = 1024;
inoshift = 4;
break;
case Fs4b:
bsize = 2048;
inoshift = 5;
break;
}
/* Determine physical block 2 */
/* Start at physical block 2, inode list */
if(VERBOSE)
if(ufd)
}
}
return (0);
}
register char *str;
{
char *skip();
}
}
register fd;
register unsigned bno;
{
{
exit(1);
}
}
register j;
{
long blocks();
return(SUCCEED);
return (FAIL);
return (SUCCEED);
}
output()
{
printf("%ld %s %ld\n",
}
long
register int j;
{
register long blks;
if(blks > 10) {
}
}
return(blks);
}
unsigned
hash(j)
uid_t j;
{
register unsigned start;
register unsigned circle;
do
{
return (circle);
return (FAIL);
}
hashinit() {
{
}
}
char *pfile;
{
void end_pwent();
void (*endpw)();
if (pfile) {
exit(5);
}
} else {
setpwent();
}
{
{
return (FAIL);
}
{
}
}
endpw();
}
register char *fname;
{
register i;
for(i = 0; i < igncnt; i++) {
}
return(TRUE);
}
char *
register char *str;
{
while(*str) {
if(*str == ' ' ||
*str == ',') {
*str = '\0';
str++;
break;
}
str++;
}
return(str);
}
register char *pfile;
{
else
}
void
{
}
}