3 * Copyright (C) 2002 Florin Malita <mali@go.ro>
5 * This file is part of LUFS, a free userspace filesystem implementation.
6 * See http://lufs.sourceforge.net/ for updates.
8 * LUFS is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * LUFS is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #include <sys/types.h>
49 struct directory* lu_cache_mkdir(char*);
50 int lu_cache_add2dir(struct directory*, char*, char*, struct lufs_fattr*);
51 int lu_cache_lookup(struct dir_cache*, char*, char*, struct lufs_fattr*, char*, int);
52 void lu_cache_add_dir(struct dir_cache*, struct directory*);
53 void lu_cache_killdir(struct directory*);
55 int lu_check_to(int, int, int);
56 int lu_atomic_read(int, char*, int, int);
57 int lu_atomic_write(int, char*, int, int);
59 int lu_opt_loadcfg(struct list_head*, char*);
60 int lu_opt_parse(struct list_head*, char*, char*);
61 int lu_opt_getint(struct list_head*, char*, char*, long int*, int);
62 const char* lu_opt_getchar(struct list_head*, char*, char*);
66 } /* end of extern "C" { */
84 #define TRACE(x) cout<<std::hex<<"["<<getpid()<<"]("<<__func__<<")"<<x<<"\n"
85 #define WARN(x) cerr<<std::hex<<"["<<getpid()<<"]("<<__func__<<")"<<x<<"\n"
86 #define ERROR(x) cerr<<std::hex<<"["<<getpid()<<"]("<<__func__<<")"<<x<<"\n"
88 #define TRACE(x...) do{}while(0)
89 #define WARN(x...) do{}while(0)
90 #define ERROR(x...) cerr<<x<<"\n"
98 #define TRACE(x...) do{fprintf(stderr, "[%x](%s) ", getpid(), __func__); fprintf(stderr, x); fprintf(stderr, "\n");}while(0)
99 #define WARN(x...) do{fprintf(stderr, "[%x](%s) ", getpid(), __func__); fprintf(stderr, x); fprintf(stderr, "\n");}while(0)
100 #define ERROR(x...) do{fprintf(stderr, "[%x](%s) ", getpid(), __func__); fprintf(stderr, x); fprintf(stderr, "\n");}while(0)
102 #define TRACE(x...) do{}while(0)
103 #define WARN(x...) do{}while(0)
104 #define ERROR(x...) do{fprintf(stderr, x); fprintf(stderr, "\n");}while(0)