linux/fs/vboxsf/utils.c

// SPDX-License-Identifier: MIT
/*
 * VirtualBox Guest Shared Folders support: Utility functions.
 * Mainly conversion from/to VirtualBox/Linux data structures.
 *
 * Copyright (C) 2006-2018 Oracle Corporation
 */

#include <linux/namei.h>
#include <linux/nls.h>
#include <linux/sizes.h>
#include <linux/pagemap.h>
#include <linux/vfs.h>
#include "vfsmod.h"

struct inode *vboxsf_new_inode(struct super_block *sb)
{}

/* set [inode] attributes based on [info], uid/gid based on [sbi] */
int vboxsf_init_inode(struct vboxsf_sbi *sbi, struct inode *inode,
		       const struct shfl_fsobjinfo *info, bool reinit)
{}

int vboxsf_create_at_dentry(struct dentry *dentry,
			    struct shfl_createparms *params)
{}

int vboxsf_stat(struct vboxsf_sbi *sbi, struct shfl_string *path,
		struct shfl_fsobjinfo *info)
{}

int vboxsf_stat_dentry(struct dentry *dentry, struct shfl_fsobjinfo *info)
{}

int vboxsf_inode_revalidate(struct dentry *dentry)
{}

int vboxsf_getattr(struct mnt_idmap *idmap, const struct path *path,
		   struct kstat *kstat, u32 request_mask, unsigned int flags)
{}

int vboxsf_setattr(struct mnt_idmap *idmap, struct dentry *dentry,
		   struct iattr *iattr)
{}

/*
 * [dentry] contains string encoded in coding system that corresponds
 * to [sbi]->nls, we must convert it to UTF8 here.
 * Returns a shfl_string allocated through __getname (must be freed using
 * __putname), or an ERR_PTR on error.
 */
struct shfl_string *vboxsf_path_from_dentry(struct vboxsf_sbi *sbi,
					    struct dentry *dentry)
{}

int vboxsf_nlscpy(struct vboxsf_sbi *sbi, char *name, size_t name_bound_len,
		  const unsigned char *utf8_name, size_t utf8_len)
{}

static struct vboxsf_dir_buf *vboxsf_dir_buf_alloc(struct list_head *list)
{}

static void vboxsf_dir_buf_free(struct vboxsf_dir_buf *b)
{}

struct vboxsf_dir_info *vboxsf_dir_info_alloc(void)
{}

void vboxsf_dir_info_free(struct vboxsf_dir_info *p)
{}

int vboxsf_dir_read_all(struct vboxsf_sbi *sbi, struct vboxsf_dir_info *sf_d,
			u64 handle)
{}