コード例 #1
0
ファイル: subdir.c プロジェクト: bfleischer/fuse-macosx
static int subdir_setxattr(const char *path, const char *name,
			   const char *value, size_t size, int flags)
#endif
{
	struct subdir *d = subdir_get();
	char *newpath;
	int err = subdir_addpath(d, path, &newpath);
	if (!err) {
#ifdef __APPLE__
		err = fuse_fs_setxattr(d->next, newpath, name, value, size,
				       flags, position);
#else
		err = fuse_fs_setxattr(d->next, newpath, name, value, size,
				       flags);
#endif
		free(newpath);
	}
	return err;
}
コード例 #2
0
ファイル: iconv.c プロジェクト: Abrikatin/fuse
static int iconv_setxattr(const char *path, const char *name,
			  const char *value, size_t size, int flags)
#endif /* __APPLE__ */
{
	struct iconv *ic = iconv_get();
	char *newpath;
	int err = iconv_convpath(ic, path, &newpath, 0);
	if (!err) {
#ifdef __APPLE__
		err = fuse_fs_setxattr(ic->next, newpath, name, value, size,
				       flags, position);
#else
		err = fuse_fs_setxattr(ic->next, newpath, name, value, size,
				       flags);
#endif /* __APPLE__ */
		free(newpath);
	}
	return err;
}
コード例 #3
0
ファイル: volicon.c プロジェクト: matthewdooler/FDT
static int
volicon_setxattr(const char *path, const char *name, const char *value,
                 size_t size, int flags, uint32_t position)
{
    ERROR_IF_MAGIC_FILE(path, EPERM);

    if ((strcmp(path, VOLICON_ROOT_MAGIC_PATH) == 0) &&
        (strcmp(name, XATTR_FINDERINFO_NAME) == 0)) {
        if ((size >= 8) && (size <= XATTR_FINDERINFO_SIZE)) {
            char finder_info[XATTR_FINDERINFO_SIZE];
            memcpy(finder_info, value, size);
            ((struct FndrGenericInfo *)&finder_info)->flags |= ntohs(0x0400);
            //finder_info[8] |= 0x100;
            return fuse_fs_setxattr(volicon_get()->next, path, name,
                                    finder_info, size, flags, position);
        }
    }

    return fuse_fs_setxattr(volicon_get()->next, path, name, value, size,
                            flags, position);
}
コード例 #4
0
ファイル: iconv.c プロジェクト: alhazred/illumos-sshfs
static int iconv_setxattr(const char *path, const char *name,
                          const char *value, size_t size, int flags)
{
    struct iconv *ic = iconv_get();
    char *newpath;
    int err = iconv_convpath(ic, path, &newpath, 0);
    if (!err) {
        err = fuse_fs_setxattr(ic->next, newpath, name, value, size, flags);
        free(newpath);
    }
    return err;
}
コード例 #5
0
ファイル: subdir.c プロジェクト: quobert/libfuse
static int subdir_setxattr(const char *path, const char *name,
			   const char *value, size_t size, int flags)
{
	struct subdir *d = subdir_get();
	char *newpath;
	int err = subdir_addpath(d, path, &newpath);
	if (!err) {
		err = fuse_fs_setxattr(d->next, newpath, name, value, size,
				       flags);
		free(newpath);
	}
	return err;
}