Commit Graph

19 Commits (5f08d03e16b551dfc828fadd74959005b72dc097)

Author SHA1 Message Date
Ronnie Sahlberg 31a2602e3d NFSCLIENT-SYNC: remove some debug output 2012-11-24 08:15:20 -08:00
Ronnie Sahlberg 67336940cd Change the sync example to perform a 'ls -l' on an NFS URL 2012-11-21 16:49:30 -08:00
Ronnie Sahlberg 763cd6e3e2 ZDR: New builtin replacement for RPC/XDR called ZDR
This patch switches libnfs over to use precompiled rpcgen files
and using ZDR.  ZDR is a trivial reimplementation of XDR that is built in
into libnfs.

This removes the dependencies of rpc/xdr completely and allow us to build on any
system, even systems where rpcgen and librpc/libxdr are not generally available.
2012-07-04 16:53:12 +10:00
Ronnie Sahlberg 183451cff5 Remove all [s]size_t / off_t and replace with [u]int64_t making libnfs 64-bit pure 2011-11-27 14:49:08 +11:00
Ronnie Sahlberg 584108f43e Merge remote branch 'memphiz/listservers' 2011-09-13 15:06:21 +10:00
unknown e078d276f7 [add] - list nfs servers nfsclient-sync 2011-09-12 20:01:42 +02:00
Memphiz dba24f1079 [fix] - fixed example - don't exit on read failure during dirent (it could be a directory - non fatal if read fails on that)
- fixed sprintf pointer
2011-09-12 18:49:28 +02:00
Memphiz a8a1b85846 [win32] - make it compile on win32 2011-09-03 15:08:48 +10:00
Ronnie Sahlberg eecdc4f3cd Win32 changes, include files we need when compiling under win32
and some socket ops are slightly different
2011-08-28 19:24:18 +10:00
Ronnie Sahlberg 57187d219a add test reading from non-0 offset to the sync api example 2011-06-25 15:05:50 +10:00
Ronnie Sahlberg 739df145d6 fix crash in mount/export
need to check that status is OK before we start dereferencing the 'export' pointers or else we will segv.
this could happen if trying to pull the list of exports from a host that does not have mountd running, or if we can not connect at all to the host.
2011-06-25 11:06:53 +10:00
Ronnie Sahlberg 1e8994af0f Add a very subtle bug in nfs_set_error()
when nfs_set_error is called with error_string being the result of a lower layer
problem so it is passed as "rpc_get_error()"

This meant that since free that nfs->rpc->error_string before we reference it a few lines further down in the vasprintf(..., error_string,
adn memory corruption triggers.

Valgrind found this, Valgrind rules!
2011-06-21 18:33:50 +10:00
Ronnie Sahlberg e4a5ba42b8 When doping chunked multi-reads of a blob bigger than the max readsize,
a read can sometimes span beyond the end of file.

In which case individual smal read chunks beyond the end of file will return OK, 0 bytes of data and EOF==1

For this case, trap when len==0 and ignore these chunks.
Do not update the read-count if / when len is 0.
2011-06-21 06:07:29 +10:00
Ronnie Sahlberg cdb19ec164 Redo the buffer handling for input buffers and make sure we only read one PDU at a time 2011-06-20 00:56:47 +10:00
Ronnie Sahlberg e210bd2af8 remove the need for an explicit rpc context for the highlevel function mount_getexports() 2011-06-19 23:20:35 +10:00
Ronnie Sahlberg df5af25fd2 add a sync function to get the export list from a server and add an example of how to use this functio n to nfsclient-sync 2011-06-19 22:31:34 +10:00
Ronnie Sahlberg e2ba5764d4 Remove the _sync postfix for the synchronous functions 2011-06-18 15:07:53 +10:00
Ronnie Sahlberg 7d0397cf0f get rid of some compiler warnings 2011-06-01 00:12:55 +10:00
Ronnie Sahlberg 84004dbf9b initial libnfs checkin 2011-02-06 15:45:09 +11:00