public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove the conv option of fat (1/3)
@ 2002-10-29 16:59 OGAWA Hirofumi
  2002-10-29 17:53 ` Linus Torvalds
  0 siblings, 1 reply; 4+ messages in thread
From: OGAWA Hirofumi @ 2002-10-29 16:59 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Hi,

This removes the conv option. This option does nothing, now.
(This patch from René Scharfe)

[Andrew, thanks for useful tools]

Please apply.

 fs/fat/inode.c              |   14 ++------------
 fs/fat/misc.c               |   38 --------------------------------------
 include/linux/msdos_fs.h    |    1 -
 include/linux/msdos_fs_sb.h |    1 -
 4 files changed, 2 insertions(+), 52 deletions(-)
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

--- fat-2.5.44/fs/fat/inode.c~fat_kill_conv	2002-10-24 00:13:54.000000000 +0900
+++ fat-2.5.44-hirofumi/fs/fat/inode.c	2002-10-24 00:13:54.000000000 +0900
@@ -255,8 +255,6 @@ static int fat_show_options(struct seq_f
 	}
 	if (opts->name_check != 'n')
 		seq_printf(m, ",check=%c", opts->name_check);
-	if (opts->conversion != 'b')
-		seq_printf(m, ",conv=%c", opts->conversion);
 	if (opts->quiet)
 		seq_puts(m, ",quiet");
 	if (opts->showexec)
@@ -299,7 +297,6 @@ static int parse_options(char *options, 
 	else
 		opts->shortname = 0;
 	opts->name_check = 'n';
-	opts->conversion = 'b';
 	opts->quiet = opts->showexec = opts->sys_immutable = opts->dotsOK =  0;
 	opts->utf8 = opts->unicode_xlate = 0;
 	opts->numtail = 1;
@@ -326,16 +323,9 @@ static int parse_options(char *options, 
 			else ret = 0;
 		}
 		else if (!strcmp(this_char,"conv") && value) {
-			if (value[0] && !value[1] && strchr("bta",*value))
-				opts->conversion = *value;
-			else if (!strcmp(value,"binary"))
-				opts->conversion = 'b';
-			else if (!strcmp(value,"text"))
-				opts->conversion = 't';
-			else if (!strcmp(value,"auto"))
-				opts->conversion = 'a';
-			else ret = 0;
+			printk("FAT: conv option is obsolete, "
+			       "not supported now\n");
 		}
 		else if (!strcmp(this_char,"nocase")) {
 			if (!is_vfat)
--- fat-2.5.44/fs/fat/misc.c~fat_kill_conv	2002-10-24 00:13:54.000000000 +0900
+++ fat-2.5.44-hirofumi/fs/fat/misc.c	2002-10-24 00:13:54.000000000 +0900
@@ -17,18 +17,6 @@
 #endif
 #define Printk(x)	printk x
 
-/* Well-known binary file extensions - of course there are many more */
-
-static char ascii_extensions[] =
-  "TXT" "ME " "HTM" "1ST" "LOG" "   " 	/* text files */
-  "C  " "H  " "CPP" "LIS" "PAS" "FOR"  /* programming languages */
-  "F  " "MAK" "INC" "BAS" 		/* programming languages */
-  "BAT" "SH "				/* program code :) */
-  "INI"					/* config files */
-  "PBM" "PGM" "DXF"			/* graphics */
-  "TEX";				/* TeX */
-
-
 /*
  * fat_fs_panic reports a severe file system problem and sets the file system
  * read-only. The file system can be made writable again by remounting it.
@@ -55,33 +43,7 @@ void fat_fs_panic(struct super_block *s,
 		printk("    File system has been set read-only\n");
 }
 
-
-/*
- * fat_is_binary selects optional text conversion based on the conversion mode
- * and the extension part of the file name.
- */
-
-int fat_is_binary(char conversion,char *extension)
-{
-	char *walk;
-
-	switch (conversion) {
-		case 'b':
-			return 1;
-		case 't':
-			return 0;
-		case 'a':
-			for (walk = ascii_extensions; *walk; walk += 3)
-				if (!strncmp(extension,walk,3)) return 0;
-			return 1;	/* default binary conversion */
-		default:
-			printk("Invalid conversion mode - defaulting to "
-			    "binary.\n");
-			return 1;
-	}
-}
-
 void lock_fat(struct super_block *sb)
 {
 	down(&(MSDOS_SB(sb)->fat_lock));
--- fat-2.5.44/include/linux/msdos_fs.h~fat_kill_conv	2002-10-24 00:13:54.000000000 +0900
+++ fat-2.5.44-hirofumi/include/linux/msdos_fs.h	2002-10-24 00:13:54.000000000 +0900
@@ -299,8 +299,7 @@ extern int fat_notify_change(struct dent
 
 /* fat/misc.c */
 extern void fat_fs_panic(struct super_block *s, const char *fmt, ...);
-extern int fat_is_binary(char conversion, char *extension);
 extern void lock_fat(struct super_block *sb);
 extern void unlock_fat(struct super_block *sb);
 extern void fat_clusters_flush(struct super_block *sb);
--- fat-2.5.44/include/linux/msdos_fs_sb.h~fat_kill_conv	2002-10-24 00:13:54.000000000 +0900
+++ fat-2.5.44-hirofumi/include/linux/msdos_fs_sb.h	2002-10-24 00:13:54.000000000 +0900
@@ -15,7 +15,6 @@ struct fat_mount_options {
 	char *iocharset;          /* Charset used for filename input/display */
 	unsigned short shortname; /* flags for shortname display/create rule */
 	unsigned char name_check; /* r = relaxed, n = normal, s = strict */
-	unsigned char conversion; /* b = binary, t = text, a = auto */
 	unsigned quiet:1,         /* set = fake successful chmods and chowns */
 		 showexec:1,      /* set = only set x bit for com/exe/bat */
 		 sys_immutable:1, /* set = system files are immutable */

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove the conv option of fat (1/3)
  2002-10-29 16:59 [PATCH] remove the conv option of fat (1/3) OGAWA Hirofumi
@ 2002-10-29 17:53 ` Linus Torvalds
  2002-10-29 19:33   ` OGAWA Hirofumi
  0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2002-10-29 17:53 UTC (permalink / raw)
  To: OGAWA Hirofumi; +Cc: linux-kernel


On Wed, 30 Oct 2002, OGAWA Hirofumi wrote:
>
> This removes the conv option. This option does nothing, now.
> (This patch from René Scharfe)

This patch was damaged in interesting ways, in particular the number of 
lines in the patch description was wrong, causing the patch program to get 
very confused.

That implies that you're using some kind of post-processing tool to remove
lines from the diff, without fixing up the diff numeric output. Correct?  
If so, your tools are broken.

I ended up hand-editing the diff to make it apply, please don't make me do 
it again.

			Linus


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove the conv option of fat (1/3)
  2002-10-29 17:53 ` Linus Torvalds
@ 2002-10-29 19:33   ` OGAWA Hirofumi
  2002-10-29 20:07     ` OGAWA Hirofumi
  0 siblings, 1 reply; 4+ messages in thread
From: OGAWA Hirofumi @ 2002-10-29 19:33 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

Linus Torvalds <torvalds@transmeta.com> writes:

> This patch was damaged in interesting ways, in particular the number of 
> lines in the patch description was wrong, causing the patch program to get 
> very confused.
> 
> That implies that you're using some kind of post-processing tool to remove
> lines from the diff, without fixing up the diff numeric output. Correct?  
> If so, your tools are broken.
> 
> I ended up hand-editing the diff to make it apply, please don't make me do 
> it again.

Whoops, sorry. The tools was correct. The 8bit char in that mail was
encoded by mailer. Probably, because `=' in my patch was broken by it,
patch command was confused.

So I made the mailer a setting which doesn't encode iso-8859-1 for the
moment.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] remove the conv option of fat (1/3)
  2002-10-29 19:33   ` OGAWA Hirofumi
@ 2002-10-29 20:07     ` OGAWA Hirofumi
  0 siblings, 0 replies; 4+ messages in thread
From: OGAWA Hirofumi @ 2002-10-29 20:07 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

OGAWA Hirofumi <hirofumi@mail.parknet.co.jp> writes:

> Linus Torvalds <torvalds@transmeta.com> writes:
> 
> > This patch was damaged in interesting ways, in particular the number of 
> > lines in the patch description was wrong, causing the patch program to get 
> > very confused.
> > 
> > That implies that you're using some kind of post-processing tool to remove
> > lines from the diff, without fixing up the diff numeric output. Correct?  
> > If so, your tools are broken.
> > 
> > I ended up hand-editing the diff to make it apply, please don't make me do 
> > it again.
> 
> Whoops, sorry. The tools was correct. The 8bit char in that mail was
> encoded by mailer. Probably, because `=' in my patch was broken by it,
> patch command was confused.
> 
> So I made the mailer a setting which doesn't encode iso-8859-1 for the
> moment.

I understood now what you say. I'll fix my tools. Sorry again.
-- 
OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-10-29 20:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-29 16:59 [PATCH] remove the conv option of fat (1/3) OGAWA Hirofumi
2002-10-29 17:53 ` Linus Torvalds
2002-10-29 19:33   ` OGAWA Hirofumi
2002-10-29 20:07     ` OGAWA Hirofumi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox