-
Notifications
You must be signed in to change notification settings - Fork 0
/
log.h
29 lines (23 loc) · 818 Bytes
/
log.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
/*
Copyright (C) 2012 Joseph J. Pfeiffer, Jr., Ph.D. <[email protected]>
This program can be distributed under the terms of the GNU GPLv3.
See the file COPYING.
*/
#ifndef _LOG_H_
#define _LOG_H_
#include <stdio.h>
// macro to log fields in structs.
#define log_struct(st, field, format, typecast) \
log_msg(" " #field " = " #format "\n", typecast st->field)
FILE *log_open(void);
void log_msg(const char *format, ...);
void log_conn(struct fuse_conn_info *conn);
int log_error(char *func);
void log_fi(struct fuse_file_info *fi);
void log_fuse_context(struct fuse_context *context);
void log_retstat(char *func, int retstat);
void log_stat(struct stat *si);
void log_statvfs(struct statvfs *sv);
int log_syscall(char *func, int retstat, int min_ret);
void log_utime(struct utimbuf *buf);
#endif