Skip to contentSkip to conversation

2.4.19-pre7-ac3: ext2 compile failure

PATCH Eyal Lebedinsky 2 participants 2 messages Apr 30, 2002 ext2 file system

lore
Share & tools
lore
#0 lore raw

The fourth hunk for balloc.c introduces a close brace without opening one:

@@ -522,8 +520,12 @@

            in_range (tmp, le32_to_cpu(gdp->bg_inode_table),
                      sb->u.ext2_sb.s_itb_per_group))
                ext2_error (sb, "ext2_new_block",
-                           "Allocating block in system zone - "
-                           "block = %u", tmp);
+                           "Allocating block in system zone - block =
%lu",
+                           tmp);
+               ext2_set_bit(j, bh->b_data);
+               DQUOT_FREE_BLOCK(inode, 1);
+               goto repeat;

+ }

In my case (Debian woody up-to-date) gcc actually crashes:

gcc -D__KERNEL__ -I/data2/usr/local/src/linux-2.4-pre-ac/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686
-malign-functions=4 -nostdinc -I
/usr/lib/gcc-lib/i386-linux/2.95.4/include -DKBUILD_BASENAME=balloc -c -o balloc.o balloc.c
balloc.c: In function `ext2_new_block':
balloc.c:524: warning: long unsigned int format, unsigned int arg (arg
4)
balloc.c:397: label io_error' used but not defined balloc.c:383: label out' used but not defined
gcc: Internal compiler error: program cc1 got fatal signal 11 make[3]: *** [balloc.o] Error 1
make[3]: Leaving directory `/data2/usr/local/src/linux-2.4-pre-ac/fs/ext2'

--
Eyal Lebedinsky ([email protected]) <http://samba.org/eyal/>

fs/ext2/balloc.c renamed from fs/ext2/balloc.c.orig +1 -1
@@ -518,7 +518,7 @@
 	if (tmp == le32_to_cpu(gdp->bg_block_bitmap) ||
 	    tmp == le32_to_cpu(gdp->bg_inode_bitmap) ||
 	    in_range (tmp, le32_to_cpu(gdp->bg_inode_table),
-		      sb->u.ext2_sb.s_itb_per_group))
+		      sb->u.ext2_sb.s_itb_per_group)) {
 		ext2_error (sb, "ext2_new_block",
 			    "Allocating block in system zone - block = %lu",
 			    tmp);
#1 lore raw
Quoted 6 lines · Eyal Lebedinsky

The fourth hunk for balloc.c introduces a close brace without opening one:

fs/ext2/balloc.c line 524

Quoted 8 lines
fs/ext2/balloc.c renamed from fs/ext2/balloc.c.orig +1 -1
@@ -518,7 +518,7 @@
 	if (tmp == le32_to_cpu(gdp->bg_block_bitmap) ||
 	    tmp == le32_to_cpu(gdp->bg_inode_bitmap) ||
 	    in_range (tmp, le32_to_cpu(gdp->bg_inode_table),
-		      sb->u.ext2_sb.s_itb_per_group))
+		      sb->u.ext2_sb.s_itb_per_group)) {
 		ext2_error (sb, "ext2_new_block",
 			    "Allocating block in system zone - block = %lu",
 			    tmp);

Sorry, that was my fault. On extracting this patch from my ext2 tree, the surrounding lines have other changes which I thought could be safely discarded. I didn't see the lone brace at the end...

Cheers, Andreas
--
Andreas Dilger
http://www-mddsp.enel.ucalgary.ca/People/adilger/
http://sourceforge.net/projects/ext2resize/