linux/fs/fat/namei_msdos.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 *  linux/fs/msdos/namei.c
 *
 *  Written 1992,1993 by Werner Almesberger
 *  Hidden files 1995 by Albert Cahalan <[email protected]> <[email protected]>
 *  Rewritten for constant inumbers 1999 by Al Viro
 */

#include <linux/module.h>
#include <linux/iversion.h>
#include "fat.h"

/* Characters that are undesirable in an MS-DOS file name */
static unsigned char bad_chars[] =;
static unsigned char bad_if_strict[] =;

/***** Formats an MS-DOS file name. Rejects invalid names. */
static int msdos_format_name(const unsigned char *name, int len,
			     unsigned char *res, struct fat_mount_options *opts)
	/*
	 * name is the proposed name, len is its length, res is
	 * the resulting name, opts->name_check is either (r)elaxed,
	 * (n)ormal or (s)trict, opts->dotsOK allows dots at the
	 * beginning of name (for hidden files)
	 */
{}

/***** Locates a directory entry.  Uses unformatted name. */
static int msdos_find(struct inode *dir, const unsigned char *name, int len,
		      struct fat_slot_info *sinfo)
{}

/*
 * Compute the hash for the msdos name corresponding to the dentry.
 * Note: if the name is invalid, we leave the hash code unchanged so
 * that the existing dentry can be used. The msdos fs routines will
 * return ENOENT or EINVAL as appropriate.
 */
static int msdos_hash(const struct dentry *dentry, struct qstr *qstr)
{}

/*
 * Compare two msdos names. If either of the names are invalid,
 * we fall back to doing the standard name comparison.
 */
static int msdos_cmp(const struct dentry *dentry,
		unsigned int len, const char *str, const struct qstr *name)
{}

static const struct dentry_operations msdos_dentry_operations =;

/*
 * AV. Wrappers for FAT sb operations. Is it wise?
 */

/***** Get inode using directory and name */
static struct dentry *msdos_lookup(struct inode *dir, struct dentry *dentry,
				   unsigned int flags)
{}

/***** Creates a directory entry (name is already formatted). */
static int msdos_add_entry(struct inode *dir, const unsigned char *name,
			   int is_dir, int is_hid, int cluster,
			   struct timespec64 *ts, struct fat_slot_info *sinfo)
{}

/***** Create a file */
static int msdos_create(struct mnt_idmap *idmap, struct inode *dir,
			struct dentry *dentry, umode_t mode, bool excl)
{}

/***** Remove a directory */
static int msdos_rmdir(struct inode *dir, struct dentry *dentry)
{}

/***** Make a directory */
static int msdos_mkdir(struct mnt_idmap *idmap, struct inode *dir,
		       struct dentry *dentry, umode_t mode)
{}

/***** Unlink a file */
static int msdos_unlink(struct inode *dir, struct dentry *dentry)
{}

static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name,
			   struct dentry *old_dentry,
			   struct inode *new_dir, unsigned char *new_name,
			   struct dentry *new_dentry, int is_hid)
{}

/***** Rename, a wrapper for rename_same_dir & rename_diff_dir */
static int msdos_rename(struct mnt_idmap *idmap,
			struct inode *old_dir, struct dentry *old_dentry,
			struct inode *new_dir, struct dentry *new_dentry,
			unsigned int flags)
{}

static const struct inode_operations msdos_dir_inode_operations =;

static void setup(struct super_block *sb)
{}

static int msdos_fill_super(struct super_block *sb, struct fs_context *fc)
{}

static int msdos_get_tree(struct fs_context *fc)
{}

static int msdos_parse_param(struct fs_context *fc, struct fs_parameter *param)
{}

static const struct fs_context_operations msdos_context_ops =;

static int msdos_init_fs_context(struct fs_context *fc)
{}

static struct file_system_type msdos_fs_type =;
MODULE_ALIAS_FS();

static int __init init_msdos_fs(void)
{}

static void __exit exit_msdos_fs(void)
{}

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();

module_init()
module_exit()