X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=examples%2Fnfsclient-raw.c;h=28dd45ceccf77bc469a9d32cd420a8ae27e2d360;hb=2aec85d1329bba793140c8937c319df65b8144da;hp=2e55d5382ffb35335a4db95a3e4e19d27b3ca895;hpb=763cd6e3e2bbb6906186e7ed6a86660276b596b7;p=deb_libnfs.git diff --git a/examples/nfsclient-raw.c b/examples/nfsclient-raw.c index 2e55d53..28dd45c 100644 --- a/examples/nfsclient-raw.c +++ b/examples/nfsclient-raw.c @@ -18,19 +18,27 @@ /* Example program using the lowlevel raw interface. * This allow accurate control of the exact commands that are being used. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #ifdef WIN32 #include "win32_compat.h" -#else -#include #endif #define SERVER "10.1.1.27" #define EXPORT "/shared" +#ifdef HAVE_POLL_H +#include +#endif + +#ifdef HAVE_NETINET_IN_H +#include +#endif + #include #include #include -#include #include "libnfs-zdr.h" #include "libnfs.h" #include "libnfs-raw.h" @@ -77,7 +85,7 @@ void rquota_connect_cb(struct rpc_context *rpc, int status, void *data _U_, void printf("Connected to RPC.RQUOTAD on %s:%d\n", client->server, client->rquota_port); printf("Send GETQUOTA request for uid 100\n"); if (rpc_rquota1_getquota_async(rpc, rquota_getquota_cb, EXPORT, 100, client) != 0) { - printf("Failed to send fsinfo request\n"); + printf("Failed to send getquota request\n"); exit(10); } } @@ -162,6 +170,7 @@ void nfs_fsinfo_cb(struct rpc_context *rpc _U_, int status, void *data, void *pr void nfs_connect_cb(struct rpc_context *rpc, int status, void *data _U_, void *private_data) { struct client *client = private_data; + struct FSINFO3args args; if (status != RPC_STATUS_SUCCESS) { printf("connection to RPC.MOUNTD on server %s failed\n", client->server); @@ -170,7 +179,8 @@ void nfs_connect_cb(struct rpc_context *rpc, int status, void *data _U_, void *p printf("Connected to RPC.NFSD on %s:%d\n", client->server, client->mount_port); printf("Send FSINFO request\n"); - if (rpc_nfs_fsinfo_async(rpc, nfs_fsinfo_cb, &client->rootfh, client) != 0) { + args.fsroot = client->rootfh; + if (rpc_nfs3_fsinfo_async(rpc, nfs_fsinfo_cb, &args, client) != 0) { printf("Failed to send fsinfo request\n"); exit(10); }