Example #1
0
static int subdir_flock(const char *path, struct fuse_file_info *fi, int op)
{
	struct subdir *d = subdir_get();
	char *newpath;
	int err = subdir_addpath(d, path, &newpath);
	if (!err) {
		err = fuse_fs_flock(d->next, newpath, fi, op);
		free(newpath);
	}
	return err;
}
Example #2
0
File: iconv.c Project: cephpp/fuse
static int iconv_flock(const char *path, struct fuse_file_info *fi, int op)
{
	struct iconv *ic = iconv_get();
	char *newpath;
	int err = iconv_convpath(ic, path, &newpath, 0);
	if (!err) {
		err = fuse_fs_flock(ic->next, newpath, fi, op);
		free(newpath);
	}
	return err;
}