lkml.org 
[lkml]   [2005]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patches in this message
/
Date
From
Subject[PATCH] 2.4.31: fix isofs mount options parser

Hello Marcelo, LKML.

Attached patch fix this whatings from gcc-3.4 and allow user mount
isofs with "session" and "sbsector" options. Without this patch, gcc-3.4
optimizer always return zero.

--- cut ---
inode.c: In function `parse_options':
inode.c:341: warning: comparison of unsigned expression < 0 is always false
inode.c:347: warning: comparison of unsigned expression < 0 is always false
--- cut ---

Signed-of-by: Andrey Melnikoff <temnota@kmv.ru>

--- linux-2.4.31/fs/isofs/inode.c~old 2005-08-10 16:18:48.000000000 +0400
+++ linux-2.4.31/fs/isofs/inode.c 2005-08-10 16:19:11.000000000 +0400
@@ -337,13 +337,13 @@
}
if (!strcmp(this_char,"session") && value) {
char * vpnt = value;
- unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
+ int ivalue = simple_strtoul(vpnt, &vpnt, 0);
if(ivalue < 0 || ivalue >99) return 0;
popt->session=ivalue+1;
}
if (!strcmp(this_char,"sbsector") && value) {
char * vpnt = value;
- unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
+ int ivalue = simple_strtoul(vpnt, &vpnt, 0);
if(ivalue < 0 || ivalue >660*512) return 0;
popt->sbsector=ivalue;
}
--
Best regards, TEMHOTA-RIPN aka MJA13-RIPE
System Administrator. mailto:temnota@kmv.ru

--- linux-2.4.31/fs/isofs/inode.c~old 2005-08-10 16:18:48.000000000 +0400
+++ linux-2.4.31/fs/isofs/inode.c 2005-08-10 16:19:11.000000000 +0400
@@ -337,13 +337,13 @@
}
if (!strcmp(this_char,"session") && value) {
char * vpnt = value;
- unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
+ int ivalue = simple_strtoul(vpnt, &vpnt, 0);
if(ivalue < 0 || ivalue >99) return 0;
popt->session=ivalue+1;
}
if (!strcmp(this_char,"sbsector") && value) {
char * vpnt = value;
- unsigned int ivalue = simple_strtoul(vpnt, &vpnt, 0);
+ int ivalue = simple_strtoul(vpnt, &vpnt, 0);
if(ivalue < 0 || ivalue >660*512) return 0;
popt->sbsector=ivalue;
}
\
 
 \ /
  Last update: 2005-08-10 14:50    [W:0.027 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site