Skip to contentSkip to conversation

2.5.44 fix compilation errors in the AFS fs

miniPATCH Jan Marek 5 participants 6 messages Oct 23, 2002

Subsystems (3)
lore
Share & tools
lore

Jan Marek

author
#0 lore raw

Hallo lkml,

I'm sending 2 patches to fix compilation errors in the AFS fs.

The first of them fixed union afs_dirent_t and using this union in the fs/afs/dir.c.

The second of them fix number of parameters of calling function kleave() in the net/rxpc/main.c.

Sincerely
Jan Marek

Signature · 4 lines
Ing. Jan Marek
University of South Bohemia
Academic Computer Centre
Phone: +420-38-7772080
fs/afs/dir.c renamed from fs/afs/dir.c.old +5 -5
@@ -72,7 +72,7 @@
 		u8	name[16];
 		u8	overflow[4];	/* if any char of the name (inc NUL) reaches here, consume
 					 * the next dirent too */
-	};
+	} parts;
 	u8	extended_name[32];
 } afs_dirent_t;
 
@@ -258,7 +258,7 @@
 
 		/* got a valid entry */
 		dire = &block->dirents[offset];
-		nlen = strnlen(dire->name,sizeof(*block) - offset*sizeof(afs_dirent_t));
+		nlen = strnlen(dire->parts.name,sizeof(*block) - offset*sizeof(afs_dirent_t));
 
 		_debug("ENT[%u.%u]: %s %u \"%.*s\"\n",
 		       blkoff/sizeof(afs_dir_block_t),offset,
@@ -290,11 +290,11 @@
 
 		/* found the next entry */
 		ret = filldir(cookie,
-			      dire->name,
+			      dire->parts.name,
 			      nlen,
 			      blkoff + offset * sizeof(afs_dirent_t),
-			      ntohl(dire->vnode),
-			      filldir==afs_dir_lookup_filldir ? dire->unique : DT_UNKNOWN);
+			      ntohl(dire->parts.vnode),
+			      filldir==afs_dir_lookup_filldir ? dire->parts.unique : DT_UNKNOWN);
 		if (ret<0) {
 			_leave(" = 0 [full]");
 			return 0;
net/rxrpc/main.c renamed from net/rxrpc/main.c.old +1 -1
@@ -123,5 +123,5 @@
 	__RXACCT(printk("Outstanding Peers      : %d\n",atomic_read(&rxrpc_peer_count)));
 	__RXACCT(printk("Outstanding Transports : %d\n",atomic_read(&rxrpc_transport_count)));
 
-	kleave();
+	kleave("");
 } /* end rxrpc_cleanup() */
#1 lore raw
Quoted 7 lines · Jan Marek

Hallo lkml,

I'm sending 2 patches to fix compilation errors in the AFS fs.

The first of them fixed union afs_dirent_t and using this union in the fs/afs/dir.c.

What compiler are you using, this is building fine with the gcc's I have. Is it 2.95 ?

#2 lore raw
Quoted 6 lines · Alan Cox
Quoted 2 lines · Jan Marek

The first of them fixed union afs_dirent_t and using this union in the fs/afs/dir.c.

What compiler are you using, this is building fine with the gcc's I have. Is it 2.95 ?

It doesn't compile with 2.95.4 from debian's 2.95.4-12. It does compile with gcc-3.x, where unnamed struct/union members seem to be introduced.

-alex

#3 lore raw
Quoted 10 lines · Alex Riesen
Quoted 6 lines · Alan Cox
Quoted 2 lines · Jan Marek

The first of them fixed union afs_dirent_t and using this union in the fs/afs/dir.c.

What compiler are you using, this is building fine with the gcc's I have. Is it 2.95 ?

It doesn't compile with 2.95.4 from debian's 2.95.4-12. It does compile with gcc-3.x, where unnamed struct/union members seem to be introduced.

Makes sense then. Applied

#4 lore raw
In reply to Alan Cox
Quoted 11 lines · Alan Cox
Quoted 7 lines · Jan Marek

Hallo lkml,

I'm sending 2 patches to fix compilation errors in the AFS fs.

The first of them fixed union afs_dirent_t and using this union in the fs/afs/dir.c.

What compiler are you using, this is building fine with the gcc's I have. Is it 2.95 ?

Most likely. Below is the error I see when trying to compile this file with 2.95:

<-- snip -->

...
gcc -Wp,-MD,fs/afs/.dir.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -Iarch/i386/mach-generic -nostdinc
-iwithprefix include -DKBUILD_BASENAME=dir -c -o fs/afs/dir.o fs/afs/dir.c
fs/afs/dir.c:75: warning: unnamed struct/union that defines no instances fs/afs/dir.c: In function `afs_dir_iterate_block':
fs/afs/dir.c:261: union has no member named `name'
fs/afs/dir.c:293: union has no member named `name'
fs/afs/dir.c:296: union has no member named `vnode'
fs/afs/dir.c:296: union has no member named `vnode'
fs/afs/dir.c:296: union has no member named `vnode'
fs/afs/dir.c:297: union has no member named `unique'
make[2]: *** [fs/afs/dir.o] Error 1

<-- snip -->

cu
Adrian

Signature · 4 lines
               "Is there not promise of rain?" Ling Tan asked suddenly out
                of the darkness. There had been need of rain for many days.
               "Only a promise," Lao Er said.
                                               Pearl S. Buck - Dragon Seed
#5 lore raw
In reply to Alan Cox
Quoted 7 lines · Alan Cox
Quoted 3 lines · Jan Marek

The first of them fixed union afs_dirent_t and using this union in the fs/afs/dir.c.

What compiler are you using, this is building fine with the gcc's I have. Is it 2.95 ?

David Howells has a full set of patches to clean up the 2.95 issues in AFS, they just didn't get integrated before Linus took off.