summaryrefslogtreecommitdiffstats
path: root/src/proto/nfs.c
diff options
context:
space:
mode:
authorMichael Brown2005-05-02 01:57:09 +0200
committerMichael Brown2005-05-02 01:57:09 +0200
commitf14af3d95c618fe3b57e38fa005a9d85d9ccaa81 (patch)
treef0cc27c56756dfd008f01e31396af238b9911c6e /src/proto/nfs.c
parentMade parse_url do more of the processing, to avoid duplicating parts of (diff)
downloadipxe-f14af3d95c618fe3b57e38fa005a9d85d9ccaa81.tar.gz
ipxe-f14af3d95c618fe3b57e38fa005a9d85d9ccaa81.tar.xz
ipxe-f14af3d95c618fe3b57e38fa005a9d85d9ccaa81.zip
Protocol structure can now specify the default port.
Diffstat (limited to 'src/proto/nfs.c')
-rw-r--r--src/proto/nfs.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/proto/nfs.c b/src/proto/nfs.c
index 7d328000..37331a95 100644
--- a/src/proto/nfs.c
+++ b/src/proto/nfs.c
@@ -103,9 +103,6 @@ static int rpc_lookup(struct sockaddr_in *addr, int prog, int ver, int sport)
*p++ = htonl(ver);
*p++ = htonl(IP_UDP);
*p++ = 0;
- if ( ! addr->sin_port ) {
- addr->sin_port = SUNRPC_PORT;
- }
for (retries = 0; retries < MAX_RPC_RETRIES; retries++) {
long timeout;
udp_transmit(addr->sin_addr.s_addr, sport, addr->sin_port,
@@ -623,5 +620,7 @@ nfssymlink:
INIT_FN ( INIT_RPC, rpc_init, nfs_reset, nfs_reset );
static struct protocol nfs_protocol __protocol = {
- "nfs", nfs
+ .name = "nfs",
+ .default_port = SUNRPC_PORT,
+ .load = nfs,
};