44 |
|
|
45 |
#define MNT_REPLY_MINSIZE (sizeof(struct rpc_reply) + sizeof(uint32_t)) |
#define MNT_REPLY_MINSIZE (sizeof(struct rpc_reply) + sizeof(uint32_t)) |
46 |
|
|
47 |
|
#ifndef MNTPROC_MNT |
48 |
|
# define MNTPROC_MNT 1 |
49 |
|
# define MNTPROC_UMNT 3 |
50 |
|
#endif /* MNTPROC_MNT */ |
51 |
|
|
52 |
static int get_ports(uint32_t server, const struct nfs_mount_data *data) |
static int get_ports(uint32_t server, const struct nfs_mount_data *data) |
53 |
{ |
{ |
54 |
uint32_t nfs_ver, mount_ver; |
uint32_t nfs_ver, mount_ver; |
98 |
(void)path; |
(void)path; |
99 |
(void)data; |
(void)data; |
100 |
|
|
101 |
#ifdef NFS_DEBUG |
#ifdef DEBUG |
102 |
struct in_addr addr = { server }; |
struct in_addr addr = { server }; |
103 |
|
|
104 |
printf("NFS params:\n"); |
printf("NFS params:\n"); |
126 |
(void)data; |
(void)data; |
127 |
(void)len; |
(void)len; |
128 |
|
|
129 |
#ifdef NFS_DEBUG |
#ifdef DEBUG |
130 |
int i = 0; |
int i = 0; |
131 |
int max = len - (len % 8); |
int max = len - (len % 8); |
132 |
|
|
192 |
} |
} |
193 |
|
|
194 |
if (mnt_reply.status != 0) { |
if (mnt_reply.status != 0) { |
195 |
fprintf(stderr, "mount call failed: %d\n", |
fprintf(stderr, "mount call failed - server replied: %s.\n", |
196 |
ntohl(mnt_reply.status)); |
strerror(ntohl(mnt_reply.status))); |
197 |
goto bail; |
goto bail; |
198 |
} |
} |
199 |
|
|
334 |
goto bail; |
goto bail; |
335 |
} |
} |
336 |
|
|
337 |
DEBUG(("Mounted %s on %s\n", pathname, path)); |
dprintf("Mounted %s on %s\n", pathname, path); |
338 |
|
|
339 |
goto done; |
goto done; |
340 |
|
|