4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
23 * Copyright (c) 1996-1998, by Sun Microsystems, Inc.
24 * All Rights Reserved.
30 #pragma ident "%Z%%M% %I% %E% SMI"
36 * Function prototypes for subr.c
41 /* size to make a buffer for holding a pathname */
42 #define CACHEFS_XMAXPATH (PATH_MAX + MAXNAMELEN + 2)
48 /* resource file info */
49 struct cachefs_rinfo
{
50 int r_fsize
; /* total file size */
51 int r_ptroffset
; /* offset to pointers area */
52 int r_ptrsize
; /* size of pointers area */
53 int r_identoffset
; /* offset to idents area */
54 int r_identsize
; /* size of idents area */
57 struct cachefs_user_values
{
71 int cachefs_dir_lock(const char *cachedirp
, int shared
);
72 int cachefs_dir_unlock(int fd
);
73 int cachefs_label_file_get(const char *filep
, struct cache_label
*clabelp
);
74 int cachefs_label_file_put(const char *filep
, struct cache_label
*clabelp
);
75 int cachefs_inuse(const char *cachedirp
);
76 int cachefs_label_file_vcheck(char *filep
, struct cache_label
*clabelp
);
77 void cachefs_resource_size(int maxinodes
, struct cachefs_rinfo
*rinfop
);
78 int cachefs_create_cache(char *dirp
, struct cachefs_user_values
*,
79 struct cache_label
*);
80 int cachefs_delete_all_cache(char *dirp
);
81 int cachefs_delete_cache(char *dirp
, char *namep
);
82 int cachefs_delete_file(const char *namep
, const struct stat64
*statp
, int flg
,
84 int cachefs_convert_uv2cl(const struct cachefs_user_values
*uvp
,
85 struct cache_label
*clp
, const char *dirp
);
86 int cachefs_convert_cl2uv(const struct cache_label
*clp
,
87 struct cachefs_user_values
*uvp
, const char *dirp
);
88 char *cachefs_file_to_dir(const char *);
89 int cachefs_clean_flag_test(const char *cachedirp
);
90 void pr_err(char *fmt
, ...);
91 time32_t
get_boottime(void);