2 fuse_xattrs - Add xattrs support using sidecar files
4 Copyright (C) 2016 Felipe Barriga Richards <felipe {at} felipebarriga.cl>
6 This program can be distributed under the terms of the GNU GPL.
11 #ifndef FUSE_XATTRS_UTILS_H
12 #define FUSE_XATTRS_UTILS_H
19 #define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__)
21 #define debug_print(fmt, ...) \
23 if (DEBUG) fprintf(stderr, "%s:%d:%s(): " fmt, __FILENAME__, __LINE__, __func__, ##__VA_ARGS__); \
26 #define error_print(fmt, ...) \
27 do { if (DEBUG) fprintf(stderr, "%s:%d:%s(): " fmt, __FILENAME__, \
28 __LINE__, __func__, ##__VA_ARGS__); } while (0)
38 enum namespace get_namespace(const char *name);
39 char *get_sidecar_path(const char *path);
40 char *sanitize_value(const char *value, size_t value_size);
41 char *prepend_source_directory(const char *b);
43 const size_t BINARY_SIDECAR_EXT_SIZE;
44 const int filename_is_sidecar(const char *string);
46 int is_directory(const char *path);
47 int is_regular_file(const char *path);
49 #endif //FUSE_XATTRS_UTILS_H