Commit 0fe105aa authored by Mikulas Patocka's avatar Mikulas Patocka Committed by Linus Torvalds
Browse files

HPFS: Remove CR/LF conversion option



Remove CR/LF conversion option

It is unused anyway. It was used on 2.2 kernels or so.

Signed-off-by: default avatarMikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 7d23ce36
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -250,8 +250,6 @@ struct dentry *hpfs_lookup(struct inode *dir, struct dentry *dentry, struct name
	hpfs_result = hpfs_i(result);
	if (!de->directory) hpfs_result->i_parent_dir = dir->i_ino;

	hpfs_decide_conv(result, name, len);

	if (de->has_acl || de->has_xtd_perm) if (!(dir->i_sb->s_flags & MS_RDONLY)) {
		hpfs_error(result->i_sb, "ACLs or XPERM found. This is probably HPFS386. This driver doesn't support it now. Send me some info on these structures");
		goto bail1;
+0 −11
Original line number Diff line number Diff line
@@ -51,7 +51,6 @@ struct hpfs_inode_info {
	unsigned i_disk_sec;	/* (files) minimalist cache of alloc info */
	unsigned i_n_secs;	/* (files) minimalist cache of alloc info */
	unsigned i_ea_size;	/* size of extended attributes */
	unsigned i_conv : 2;	/* (files) crlf->newline hackery */
	unsigned i_ea_mode : 1;	/* file's permission is stored in ea */
	unsigned i_ea_uid : 1;	/* file's uid is stored in ea */
	unsigned i_ea_gid : 1;	/* file's gid is stored in ea */
@@ -73,7 +72,6 @@ struct hpfs_sb_info {
	uid_t sb_uid;			/* uid from mount options */
	gid_t sb_gid;			/* gid from mount options */
	umode_t sb_mode;		/* mode from mount options */
	unsigned sb_conv : 2;		/* crlf->newline hackery */
	unsigned sb_eas : 2;		/* eas: 0-ignore, 1-ro, 2-rw */
	unsigned sb_err : 2;		/* on errs: 0-cont, 1-ro, 2-panic */
	unsigned sb_chk : 2;		/* checks: 0-no, 1-normal, 2-strict */
@@ -90,14 +88,6 @@ struct hpfs_sb_info {
	int sb_timeshift;
};

/*
 * conv= options
 */

#define CONV_BINARY 0			/* no conversion */
#define CONV_TEXT 1			/* crlf->newline */
#define CONV_AUTO 2			/* decide based on file contents */

/* Four 512-byte buffers and the 2k block obtained by concatenating them */

struct quad_buffer_head {
@@ -298,7 +288,6 @@ int hpfs_compare_names(struct super_block *, const unsigned char *, unsigned,
		       const unsigned char *, unsigned, int);
int hpfs_is_name_long(const unsigned char *, unsigned);
void hpfs_adjust_length(const unsigned char *, unsigned *);
void hpfs_decide_conv(struct inode *, const unsigned char *, unsigned);

/* namei.c */

+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@ void hpfs_init_inode(struct inode *i)
	i->i_uid = hpfs_sb(sb)->sb_uid;
	i->i_gid = hpfs_sb(sb)->sb_gid;
	i->i_mode = hpfs_sb(sb)->sb_mode;
	hpfs_inode->i_conv = hpfs_sb(sb)->sb_conv;
	i->i_size = -1;
	i->i_blocks = -1;
	
+0 −33
Original line number Diff line number Diff line
@@ -8,39 +8,6 @@

#include "hpfs_fn.h"

static const char *text_postfix[]={
".ASM", ".BAS", ".BAT", ".C", ".CC", ".CFG", ".CMD", ".CON", ".CPP", ".DEF",
".DOC", ".DPR", ".ERX", ".H", ".HPP", ".HTM", ".HTML", ".JAVA", ".LOG", ".PAS",
".RC", ".TEX", ".TXT", ".Y", ""};

static const char *text_prefix[]={
"AUTOEXEC.", "CHANGES", "COPYING", "CONFIG.", "CREDITS", "FAQ", "FILE_ID.DIZ",
"MAKEFILE", "READ.ME", "README", "TERMCAP", ""};

void hpfs_decide_conv(struct inode *inode, const unsigned char *name, unsigned len)
{
	struct hpfs_inode_info *hpfs_inode = hpfs_i(inode);
	int i;
	if (hpfs_inode->i_conv != CONV_AUTO) return;
	for (i = 0; *text_postfix[i]; i++) {
		int l = strlen(text_postfix[i]);
		if (l <= len)
			if (!hpfs_compare_names(inode->i_sb, text_postfix[i], l, name + len - l, l, 0))
				goto text;
	}
	for (i = 0; *text_prefix[i]; i++) {
		int l = strlen(text_prefix[i]);
		if (l <= len)
			if (!hpfs_compare_names(inode->i_sb, text_prefix[i], l, name, l, 0))
				goto text;
	}
	hpfs_inode->i_conv = CONV_BINARY;
	return;
	text:
	hpfs_inode->i_conv = CONV_TEXT;
	return;
}

static inline int not_allowed_char(unsigned char c)
{
	return c<' ' || c=='"' || c=='*' || c=='/' || c==':' || c=='<' ||
+0 −3
Original line number Diff line number Diff line
@@ -151,7 +151,6 @@ static int hpfs_create(struct inode *dir, struct dentry *dentry, int mode, struc
	result->i_op = &hpfs_file_iops;
	result->i_fop = &hpfs_file_ops;
	result->i_nlink = 1;
	hpfs_decide_conv(result, name, len);
	hpfs_i(result)->i_parent_dir = dir->i_ino;
	result->i_ctime.tv_sec = result->i_mtime.tv_sec = result->i_atime.tv_sec = local_to_gmt(dir->i_sb, dee.creation_date);
	result->i_ctime.tv_nsec = 0;
@@ -616,8 +615,6 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,
		mark_buffer_dirty(bh);
		brelse(bh);
	}
	hpfs_i(i)->i_conv = hpfs_sb(i->i_sb)->sb_conv;
	hpfs_decide_conv(i, new_name, new_len);
end1:
	hpfs_unlock(i->i_sb);
	return err;
Loading