Exemplo n.º 1
0
static int
volicon_create(const char *path, mode_t mode, struct fuse_file_info *fi)
{
    ERROR_IF_MAGIC_FILE(path, EEXIST);

    return fuse_fs_create(volicon_get()->next, path, mode, fi);
}
Exemplo n.º 2
0
static int subdir_create(const char *path, mode_t mode,
			 struct fuse_file_info *fi)
{
	struct subdir *d = subdir_get();
	char *newpath;
	int err = subdir_addpath(d, path, &newpath);
	if (!err) {
		err = fuse_fs_create(d->next, newpath, mode, fi);
		free(newpath);
	}
	return err;
}
Exemplo n.º 3
0
static int iconv_create(const char *path, mode_t mode,
			struct fuse_file_info *fi)
{
	struct iconv *ic = iconv_get();
	char *newpath;
	int err = iconv_convpath(ic, path, &newpath, 0);
	if (!err) {
		err = fuse_fs_create(ic->next, newpath, mode, fi);
		free(newpath);
	}
	return err;
}