6#define FUSE_USE_VERSION 31
31static int xmp_getattr(
const char *path,
struct stat *stbuf,
39 res = fstat(fi->
fh, stbuf);
41 res = lstat(path, stbuf);
48static int xmp_unlink(
const char *path)
59static int xmp_rename(
const char *from,
const char *to,
unsigned int flags)
66 if(!getenv(
"RELEASEUNLINKRACE_DELAY_DISABLE")) usleep(100000);
68 res = rename(from, to);
75static int xmp_create(
const char *path, mode_t mode,
struct fuse_file_info *fi)
79 fd = open(path, fi->
flags, mode);
91 if(!getenv(
"RELEASEUNLINKRACE_DELAY_DISABLE")) usleep(100000);
100 .getattr = xmp_getattr,
101 .unlink = xmp_unlink,
102 .rename = xmp_rename,
103 .create = xmp_create,
104 .release = xmp_release,
107int main(
int argc,
char *argv[])
110 return fuse_main(argc, argv, &xmp_oper, NULL);
#define fuse_main(argc, argv, op, private_data)
void *(* init)(struct fuse_conn_info *conn, struct fuse_config *cfg)