fileset.h revision f2fc321be9b4df7748e8c31a5edd154b0177b139
/*
* 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.
*/
#ifndef _FB_FILESET_H
#define _FB_FILESET_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include "config.h"
#ifndef HAVE_OFF64_T
/*
* We are probably on linux.
* According to http://www.suse.de/~aj/linux_lfs.html, defining the
* above, automatically changes type of off_t to off64_t. so let
* us use only off_t as off64_t is not defined
*/
#endif /* HAVE_OFF64_T */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/resource.h>
#include <pthread.h>
#include "fileobj.h"
#ifdef __cplusplus
extern "C" {
#endif
#define FSE_MAXTID 16384
#define FSE_MAXPATHLEN 16
#define FSE_DIR 0x1
#define FSE_FREE 0x2
#define FSE_EXISTS 0x4
#define FSE_BUSY 0x8
typedef struct filesetentry {
struct filesetentry *fse_next;
struct filesetentry *fse_parent;
char *fse_path;
int fse_depth;
int fse_flags;
typedef struct fileset {
int fs_attrs; /* Attributes */
double fs_meandepth; /* Computed mean depth */
double fs_meanwidth; /* Specified mean dir width */
double fs_meansize; /* Specified mean file size */
int fs_realfiles; /* Actual files */
} fileset_t;
int fileset_createset(fileset_t *);
fileset_t *fileset_define(char *);
void fileset_usage(void);
#ifdef __cplusplus
}
#endif
#endif /* _FB_FILESET_H */