/[hurd]/hurd/nfs/mount.c
ViewVC logotype

Diff of /hurd/nfs/mount.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.26 by roland, Fri May 3 22:52:35 2002 UTC revision 1.27 by marcus, Sun Sep 29 15:11:59 2002 UTC
# Line 116  mount_root (char *name, char *host) Line 116  mount_root (char *name, char *host)
116           argument is either "tcp" or "udp"  Thus, is this backwards           argument is either "tcp" or "udp"  Thus, is this backwards
117           (as service_name suggests)?  If so, should it read:           (as service_name suggests)?  If so, should it read:
118               s = getservbyname (pmap_service_name, "udp");               s = getservbyname (pmap_service_name, "udp");
119           or is there something I am missing here? */           or is there something I am missing here?  */
120        s = getservbyname ("sunrpc", pmap_service_name);        s = getservbyname ("sunrpc", pmap_service_name);
121        if (s)        if (s)
122          pmapport = s->s_port;          pmapport = s->s_port;
# Line 158  mount_root (char *name, char *host) Line 158  mount_root (char *name, char *host)
158            return 0;            return 0;
159          }          }
160    
161        *p++ = htonl (MOUNTPROG);        *(p++) = htonl (MOUNTPROG);
162        *p++ = htonl (MOUNTVERS);        *(p++) = htonl (MOUNTVERS);
163        *p++ = htonl (IPPROTO_UDP);        *(p++) = htonl (IPPROTO_UDP);
164        *p++ = htonl (0);        *(p++) = htonl (0);
165        err = conduct_rpc (&rpcbuf, &p);        err = conduct_rpc (&rpcbuf, &p);
166        if (!err)        if (!err)
167          {          {
168            port = ntohl (*p++);            port = ntohl (*p);
169              p++;
170            addr.sin_port = htons (port);            addr.sin_port = htons (port);
171          }          }
172        else if (mount_port)        else if (mount_port)
# Line 204  mount_root (char *name, char *host) Line 205  mount_root (char *name, char *host)
205    /* XXX Protocol spec says this should be a "unix error code"; we'll    /* XXX Protocol spec says this should be a "unix error code"; we'll
206       pretend that an NFS error code is what's meant; the numbers match       pretend that an NFS error code is what's meant; the numbers match
207       anyhow.  */       anyhow.  */
208    err = nfs_error_trans (htonl (*p++));    err = nfs_error_trans (htonl (*p));
209      p++;
210    if (err)    if (err)
211      {      {
212        error (0, err, name);        error (0, err, name);
# Line 235  mount_root (char *name, char *host) Line 237  mount_root (char *name, char *host)
237            error (0, errno, "rpc");            error (0, errno, "rpc");
238            goto error_with_rpcbuf;            goto error_with_rpcbuf;
239          }          }
240        *p++ = htonl (NFS_PROGRAM);        *(p++) = htonl (NFS_PROGRAM);
241        *p++ = htonl (NFS_VERSION);        *(p++) = htonl (NFS_VERSION);
242        *p++ = htonl (IPPROTO_UDP);        *(p++) = htonl (IPPROTO_UDP);
243        *p++ = htonl (0);        *(p++) = htonl (0);
244        err = conduct_rpc (&rpcbuf, &p);        err = conduct_rpc (&rpcbuf, &p);
245        if (!err)        if (!err)
246          port = ntohl (*p++);          {
247              port = ntohl (*p);
248              p++;
249            }
250        else if (nfs_port)        else if (nfs_port)
251          port = nfs_port;          port = nfs_port;
252        else        else

Legend:
Removed from v.1.26  
changed lines
  Added in v.1.27

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26