#include <fcntl.h>
#include "libnfs.h"
#include <rpc/rpc.h> /* for authunix_create() */
+#include "libnfs-raw.h"
+#include "libnfs-raw-mount.h"
struct client {
char *server;
};
+char buf[2*1024*1024];
+
int main(int argc _U_, char *argv[] _U_)
{
struct nfs_context *nfs;
client.server = SERVER;
client.export = EXPORT;
client.is_finished = 0;
- char buf[16];
off_t offset;
struct statvfs svfs;
+ exports export, tmp;
+
+ printf("exports on server %s\n", SERVER);
+ export = mount_getexports(SERVER);
+ tmp = export;
+ while (tmp != NULL) {
+ printf("Export: %s\n", tmp->ex_dir);
+ tmp = tmp->ex_next;
+ }
+ mount_free_export_list(export);
+
nfs = nfs_init_context();
if (nfs == NULL) {
exit(10);
}
+#if 0
ret = nfs_read(nfs, nfsfh, 16, buf);
if (ret < 0) {
printf("Failed to pread(%s) %s\n", NFSFILE, nfs_get_error(nfs));
printf("%02x ", buf[i]&0xff);
}
printf("\n");
- ret = nfs_read(nfs, nfsfh, 16, buf);
+#endif
+ ret = nfs_read(nfs, nfsfh, sizeof(buf), buf);
if (ret < 0) {
printf("Failed to pread(%s) %s\n", NFSFILE, nfs_get_error(nfs));
exit(10);
printf("nfsclient finished\n");
return 0;
}
+