[add] - list nfs servers nfsclient-sync

libnfs-4.0.0-vitalif
unknown 2011-09-12 19:58:23 +02:00
parent 4e9dcb7665
commit e078d276f7
1 changed files with 18 additions and 0 deletions

View File

@ -61,6 +61,21 @@ struct client {
};
void PrintServerList()
{
struct nfs_server_list *srvrs;
struct nfs_server_list *srv;
srvrs = nfs_find_local_servers();
for (srv=srvrs; srv; srv = srv->next)
{
printf("Found nfs server: %s\n", srv->addr);
}
free_nfs_srvr_list(srvrs);
}
char buf[3*1024*1024+337];
int main(int argc _U_, char *argv[] _U_)
@ -86,6 +101,9 @@ int main(int argc _U_, char *argv[] _U_)
client.server = SERVER;
client.export = EXPORT;
client.is_finished = 0;
PrintServerList();
export = mount_getexports(SERVER);
if (export != NULL) {
printf("exports on server %s\n", SERVER);