Skip to contentSkip to conversation

nfsroot compile broken in 2.6.9-rc1?

PATCH Ray Lehtiniemi 2 participants 2 messages Aug 24, 2004 NFS client

lore
Share & tools
lore
#0 lore raw

hi folks

just pulled the latest changes, and it seems nfsroot no longer compiles:

CC fs/nfs/nfsroot.o
fs/nfs/nfsroot.c: In function `root_nfs_get_handle':
fs/nfs/nfsroot.c:499: error: cannot convert to a pointer type fs/nfs/nfsroot.c:499: error: cannot convert to a pointer type make[2]: *** [fs/nfs/nfsroot.o] Error 1

i'm no bitkeeper expert yet, but it seems that this change:

ChangeSet 1.1803.109.17 2004/08/23 18:16:26 [email protected]

may not be complete...

this patch compiles and boots for me...

===== fs/nfs/nfsroot.c 1.20 vs edited =====

fs/nfs/nfsroot.c +1 -1
@@ -496,7 +496,7 @@
 		printk(KERN_ERR "Root-NFS: Server returned error %d "
 				"while mounting %s\n", status, nfs_path);
 	else
-		nfs_copy_fh(nfs_data.root, fh);
+		nfs_copy_fh((struct nfs_fh *)&nfs_data.root, (struct nfs_fh *)&fh);
 
 	return status;
 }

please cc me on replies, as i'm not subscribed.

thanks

Signature · 2 lines
----------------------------------------------------------------------
     Ray L   <[email protected]>
#1 lore raw

På ty , 24/08/2004 klokka 12:50, skreiv Ray Lehtiniemi:

Quoted 8 lines

just pulled the latest changes, and it seems nfsroot no longer compiles:

CC fs/nfs/nfsroot.o
fs/nfs/nfsroot.c: In function `root_nfs_get_handle':
fs/nfs/nfsroot.c:499: error: cannot convert to a pointer type fs/nfs/nfsroot.c:499: error: cannot convert to a pointer type make[2]: *** [fs/nfs/nfsroot.o] Error 1

Chuck, that conversion to nfs_fh_copy() is bogus since we're not copying into an nfs_fh anyway. Let's just revert it.

Cheers,
Trond

fs/nfs/nfsroot.c renamed from fs/nfs/nfsroot.c.orig +4 -2
@@ -495,8 +495,10 @@ static int __init root_nfs_get_handle(vo
 	if (status < 0)
 		printk(KERN_ERR "Root-NFS: Server returned error %d "
 				"while mounting %s\n", status, nfs_path);
-	else
-		nfs_copy_fh(nfs_data.root, fh);
+	else {
+		nfs_data.root.size = fh.size;
+		memcpy(nfs_data.root.data, fh.data, fh.size);
+	}
 
 	return status;
 }