fix for iso9660 fs

Andries.Brouwer@cwi.nl
Sun, 11 May 1997 18:07:21 +0200


Yesterday a Debian maintainer complained about a problem
with mount (namely that iso9660 wants the mode in decimal
so that people have to do octal-to-decimal conversion
before using the mode= mount option; most other file
systems use simple_strtoul() so that one can choose the radix
oneself by starting with 0 or 0x).

Since that is a kernel bug, not a mount bug, let me submit
a patch again. (The first time was a nice and beautiful patch
doing the option parsing for all file systems in a uniform way,
using one single routine. No reaction. The second one was a patch
correcting all of the option parsing for iso9660. No reaction.
This is the third time, with a patch correcting only this minor point.)

Andries

PS1 - I do not read the linux-kernel mailing list, and the newsgroup
is mostly dead. Cc to me if you want me to read a reaction.

PS2 - A few days ago somebody reminded me again of my promise to make
kdev_t a pointer to a device driver struct, and to handle the
transition to large device numbers. Well, I write this from
a kernel where kdev_t is a pointer and device numbers have
32 bits, but Linus does not consider this change urgent,
so as far as I am concerned this matter will sleep for half a year or so.

Edited patch below - line numbers may differ.

--- ../../../../linux-2.0.30/linux/fs/isofs/inode.c Sat Aug 17 20:19:28 1996
+++ ./inode.c Sun May 11 17:19:53 1997
@@ -133,13 +131,7 @@
!strcmp(this_char,"uid") ||
!strcmp(this_char,"gid"))) {
char * vpnt = value;
- unsigned int ivalue;
- ivalue = 0;
- while(*vpnt){
- if(*vpnt < '0' || *vpnt > '9') break;
- ivalue = ivalue * 10 + (*vpnt - '0');
- vpnt++;
- }
+ unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
if (*vpnt) return 0;
switch(*this_char) {
case 'b':