Skip to contentSkip to conversation

patch for 2.4.19-pre8 nfsroot.c to compile

PATCH Dan Kegel 2 participants 2 messages May 23, 2002 NFS client

lore
Share & tools
lore

Dan Kegel

author
#0 lore raw
Quoted 6 lines

The patch below is required for fs/nfs/nfsroot.c to compile in 2.4.19-pre8:

diff -X dontdiff -urN linux/fs/nfs/nfsroot.c linux-nfsroot/fs/nfs/nfsroot.c

fs/nfs/nfsroot.c Thu May 23 12:10:11 2002 line 350

Quoted 8 lines
fs/nfs/nfsroot.c Thu May 23 12:10:11 2002 renamed from fs/nfs/nfsroot.c Thu May 23 12:04:17 2002 +1 -1
@@ -344,7 +344,7 @@
  struct sockaddr_in sin;
 
  printk(KERN_NOTICE "Looking up port of RPC %d/%d on %s\n",
-  program, version, in_ntoa(servaddr));
+  program, version, NIPQUAD(servaddr));
  set_sockaddr(&sin, servaddr, 0);
  return rpc_getport_external(&sin, program, version, proto);
 }

Er, shouldn't you change the %s to a %d.%d.%d.%d?
- Dan

#1 lore raw

Doh! Here's a corrected patch (other places in the kernel use %u instead of %d, so that's what I used):

fs/nfs/nfsroot.c Thu May 23 16:02:29 2002 renamed from fs/nfs/nfsroot.c Thu May 23 12:04:17 2002 +2 -2
@@ -343,8 +343,8 @@
 {
  struct sockaddr_in sin;
 
- printk(KERN_NOTICE "Looking up port of RPC %d/%d on %s\n",
-  program, version, in_ntoa(servaddr));
+ printk(KERN_NOTICE "Looking up port of RPC %d/%d on %u.%u.%u.%u\n",
+  program, version, NIPQUAD(servaddr));
  set_sockaddr(&sin, servaddr, 0);
  return rpc_getport_external(&sin, program, version, proto);
 }

----- Original Message -----
From: "Dan Kegel" <[email protected]>
To: "Kevin P. Fleming" <[email protected]>; <[email protected]>
Sent: Thursday, May 23, 2002 03:32 PM
Subject: re: [PATCH] patch for 2.4.19-pre8 nfsroot.c to compile

<snip>

Quoted 4 lines

Er, shouldn't you change the %s to a %d.%d.%d.%d?
- Dan