X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;ds=sidebyside;f=examples%2Fnfsclient-sync.c;h=8563c1eadd38cf91b326646139f3fc1b8e5a4ce5;hb=c985c015f2be8d3f87a4b89923c83755feb393f2;hp=bc19f48752c5d45be014e44f31c46e2487f6419e;hpb=e078d276f732eb85615faf9cb1b1c16060b6134d;p=deb_libnfs.git diff --git a/examples/nfsclient-sync.c b/examples/nfsclient-sync.c index bc19f48..8563c1e 100644 --- a/examples/nfsclient-sync.c +++ b/examples/nfsclient-sync.c @@ -82,7 +82,7 @@ int main(int argc _U_, char *argv[] _U_) { struct nfs_context *nfs; int i, ret; - off_t offset; + uint64_t offset; struct client client; struct stat st; struct nfsfh *nfsfh; @@ -239,7 +239,7 @@ int main(int argc _U_, char *argv[] _U_) while((nfsdirent = nfs_readdir(nfs, nfsdir)) != NULL) { char filename[1024]; printf("Inode:%d Name:%s ", (int)nfsdirent->inode, nfsdirent->name); - sprintf(&filename, "%s/%s", NFSDIR, nfsdirent->name); + sprintf(filename, "%s/%s", NFSDIR, nfsdirent->name); ret = nfs_open(nfs, filename, O_RDONLY, &nfsfh); if (ret != 0) { printf("Failed to open(%s) %s\n", filename, nfs_get_error(nfs)); @@ -248,7 +248,6 @@ int main(int argc _U_, char *argv[] _U_) ret = nfs_read(nfs, nfsfh, sizeof(buf), buf); if (ret < 0) { printf("Error reading file\n"); - exit(10); } printf("Read %d bytes\n", ret); ret = nfs_close(nfs, nfsfh);