Commit 695f66cf authored by Hirofumi Ogawa's avatar Hirofumi Ogawa Committed by Linus Torvalds

[PATCH] cleanup FAT stuff (2/2)

This patch remove unused variable/function/define, and small indent
cleanup.
parent 9285a3a7
...@@ -23,7 +23,6 @@ EXPORT_SYMBOL(msdos_mkdir); ...@@ -23,7 +23,6 @@ EXPORT_SYMBOL(msdos_mkdir);
EXPORT_SYMBOL(msdos_rename); EXPORT_SYMBOL(msdos_rename);
EXPORT_SYMBOL(msdos_rmdir); EXPORT_SYMBOL(msdos_rmdir);
EXPORT_SYMBOL(msdos_unlink); EXPORT_SYMBOL(msdos_unlink);
EXPORT_SYMBOL(msdos_put_super);
static struct super_block *msdos_get_sb(struct file_system_type *fs_type, static struct super_block *msdos_get_sb(struct file_system_type *fs_type,
int flags, char *dev_name, void *data) int flags, char *dev_name, void *data)
......
...@@ -6,8 +6,6 @@ ...@@ -6,8 +6,6 @@
* Rewritten for constant inumbers 1999 by Al Viro * Rewritten for constant inumbers 1999 by Al Viro
*/ */
#define __NO_VERSION__
#include <linux/module.h> #include <linux/module.h>
#include <linux/time.h> #include <linux/time.h>
...@@ -23,8 +21,8 @@ static const char *reserved_names[] = { ...@@ -23,8 +21,8 @@ static const char *reserved_names[] = {
"CON ","PRN ","NUL ","AUX ", "CON ","PRN ","NUL ","AUX ",
"LPT1 ","LPT2 ","LPT3 ","LPT4 ", "LPT1 ","LPT2 ","LPT3 ","LPT4 ",
"COM1 ","COM2 ","COM3 ","COM4 ", "COM1 ","COM2 ","COM3 ","COM4 ",
NULL }; NULL
};
/* Characters that are undesirable in an MS-DOS file name */ /* Characters that are undesirable in an MS-DOS file name */
...@@ -33,12 +31,6 @@ static char bad_if_strict_pc[] = "+=,; "; ...@@ -33,12 +31,6 @@ static char bad_if_strict_pc[] = "+=,; ";
static char bad_if_strict_atari[] = " "; /* GEMDOS is less restrictive */ static char bad_if_strict_atari[] = " "; /* GEMDOS is less restrictive */
#define bad_if_strict(opts) ((opts)->atari ? bad_if_strict_atari : bad_if_strict_pc) #define bad_if_strict(opts) ((opts)->atari ? bad_if_strict_atari : bad_if_strict_pc)
/* Must die */
void msdos_put_super(struct super_block *sb)
{
fat_put_super(sb);
}
/***** Formats an MS-DOS file name. Rejects invalid names. */ /***** Formats an MS-DOS file name. Rejects invalid names. */
static int msdos_format_name(const char *name,int len, static int msdos_format_name(const char *name,int len,
char *res,struct fat_mount_options *opts) char *res,struct fat_mount_options *opts)
......
...@@ -55,7 +55,7 @@ void UMSDOS_put_super (struct super_block *sb) ...@@ -55,7 +55,7 @@ void UMSDOS_put_super (struct super_block *sb)
saved_root = NULL; saved_root = NULL;
pseudo_root = NULL; pseudo_root = NULL;
} }
msdos_put_super (sb); fat_put_super (sb);
} }
......
...@@ -1073,7 +1073,7 @@ static void vfat_remove_entry(struct inode *dir,struct vfat_slot_info *sinfo, ...@@ -1073,7 +1073,7 @@ static void vfat_remove_entry(struct inode *dir,struct vfat_slot_info *sinfo,
if (fat_get_entry(dir, &offset, &bh, &de, &ino) < 0) if (fat_get_entry(dir, &offset, &bh, &de, &ino) < 0)
continue; continue;
de->name[0] = DELETED_FLAG; de->name[0] = DELETED_FLAG;
de->attr = 0; de->attr = ATTR_NONE;
fat_mark_buffer_dirty(sb, bh); fat_mark_buffer_dirty(sb, bh);
} }
if (bh) fat_brelse(sb, bh); if (bh) fat_brelse(sb, bh);
......
...@@ -6,13 +6,14 @@ ...@@ -6,13 +6,14 @@
*/ */
#include <asm/byteorder.h> #include <asm/byteorder.h>
#define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */
#define SECTOR_SIZE 512 /* sector size (bytes) */ #define SECTOR_SIZE 512 /* sector size (bytes) */
#define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */ #define SECTOR_BITS 9 /* log2(SECTOR_SIZE) */
#define MSDOS_DPB (MSDOS_DPS) /* dir entries per block */ #define MSDOS_DPB (MSDOS_DPS) /* dir entries per block */
#define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */ #define MSDOS_DPB_BITS 4 /* log2(MSDOS_DPB) */
#define MSDOS_DPS (SECTOR_SIZE/sizeof(struct msdos_dir_entry)) #define MSDOS_DPS (SECTOR_SIZE / sizeof(struct msdos_dir_entry))
#define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */ #define MSDOS_DPS_BITS 4 /* log2(MSDOS_DPS) */
#define MSDOS_ROOT_INO 1 /* == MINIX_ROOT_INO */
#define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */ #define MSDOS_DIR_BITS 5 /* log2(sizeof(struct msdos_dir_entry)) */
/* directory limit */ /* directory limit */
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
#define FAT_CACHE 8 /* FAT cache size */ #define FAT_CACHE 8 /* FAT cache size */
#define ATTR_NONE 0 /* no attribute bits */
#define ATTR_RO 1 /* read-only */ #define ATTR_RO 1 /* read-only */
#define ATTR_HIDDEN 2 /* hidden */ #define ATTR_HIDDEN 2 /* hidden */
#define ATTR_SYS 4 /* system */ #define ATTR_SYS 4 /* system */
...@@ -30,18 +32,11 @@ ...@@ -30,18 +32,11 @@
#define ATTR_DIR 16 /* directory */ #define ATTR_DIR 16 /* directory */
#define ATTR_ARCH 32 /* archived */ #define ATTR_ARCH 32 /* archived */
#define ATTR_NONE 0 /* no attribute bits */
#define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN) #define ATTR_UNUSED (ATTR_VOLUME | ATTR_ARCH | ATTR_SYS | ATTR_HIDDEN)
/* attribute bits that are copied "as is" */ /* attribute bits that are copied "as is" */
#define ATTR_EXT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME) #define ATTR_EXT (ATTR_RO | ATTR_HIDDEN | ATTR_SYS | ATTR_VOLUME)
/* bits that are used by the Windows 95/Windows NT extended FAT */ /* bits that are used by the Windows 95/Windows NT extended FAT */
#define ATTR_DIR_READ_BOTH 512 /* read both short and long names from the
* vfat filesystem. This is used by Samba
* to export the vfat filesystem with correct
* shortnames. */
#define ATTR_DIR_READ_SHORT 1024
#define CASE_LOWER_BASE 8 /* base is lower case */ #define CASE_LOWER_BASE 8 /* base is lower case */
#define CASE_LOWER_EXT 16 /* extension is lower case */ #define CASE_LOWER_EXT 16 /* extension is lower case */
...@@ -70,11 +65,6 @@ ...@@ -70,11 +65,6 @@
#define IS_FSINFO(x) (CF_LE_L((x)->signature1) == FAT_FSINFO_SIG1 \ #define IS_FSINFO(x) (CF_LE_L((x)->signature1) == FAT_FSINFO_SIG1 \
&& CF_LE_L((x)->signature2) == FAT_FSINFO_SIG2) && CF_LE_L((x)->signature2) == FAT_FSINFO_SIG2)
/*
* Inode flags
*/
#define FAT_BINARY_FL 0x00000001 /* File contains binary data */
/* /*
* ioctl commands * ioctl commands
*/ */
...@@ -165,11 +155,8 @@ struct msdos_dir_slot { ...@@ -165,11 +155,8 @@ struct msdos_dir_slot {
}; };
struct vfat_slot_info { struct vfat_slot_info {
int is_long; /* was the found entry long */
int long_slots; /* number of long slots in filename */ int long_slots; /* number of long slots in filename */
int total_slots; /* total slots (long and short) */
loff_t longname_offset; /* dir offset for longname start */ loff_t longname_offset; /* dir offset for longname start */
loff_t shortname_offset; /* dir offset for shortname start */
int ino; /* ino for the file */ int ino; /* ino for the file */
}; };
...@@ -325,7 +312,6 @@ extern int fat_scan(struct inode *dir, const char *name, ...@@ -325,7 +312,6 @@ extern int fat_scan(struct inode *dir, const char *name,
struct msdos_dir_entry **res_de, int *ino); struct msdos_dir_entry **res_de, int *ino);
/* msdos/namei.c - these are for Umsdos */ /* msdos/namei.c - these are for Umsdos */
extern void msdos_put_super(struct super_block *sb);
extern struct dentry *msdos_lookup(struct inode *dir, struct dentry *); extern struct dentry *msdos_lookup(struct inode *dir, struct dentry *);
extern int msdos_create(struct inode *dir, struct dentry *dentry, int mode); extern int msdos_create(struct inode *dir, struct dentry *dentry, int mode);
extern int msdos_rmdir(struct inode *dir, struct dentry *dentry); extern int msdos_rmdir(struct inode *dir, struct dentry *dentry);
......
...@@ -25,7 +25,6 @@ struct fat_mount_options { ...@@ -25,7 +25,6 @@ struct fat_mount_options {
posixfs:1, /* Allow names like makefile and Makefile to coexist */ posixfs:1, /* Allow names like makefile and Makefile to coexist */
numtail:1, /* Does first alias have a numeric '~1' type tail? */ numtail:1, /* Does first alias have a numeric '~1' type tail? */
atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */ atari:1, /* Use Atari GEMDOS variation of MS-DOS fs */
fat32:1, /* Is this a FAT32 partition? */
nocase:1; /* Does this need case conversion? 0=need case conversion*/ nocase:1; /* Does this need case conversion? 0=need case conversion*/
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment