- ret = nfs_open(nfs, NFSFILEW, O_WRONLY, &nfsfh);
- if (ret != 0) {
- printf("Failed to open(%s) %s\n", NFSFILEW, nfs_get_error(nfs));
- exit(10);
- }
- ret = nfs_pwrite(nfs, nfsfh, 0, 16, buf);
- if (ret < 0) {
- printf("Failed to pwrite(%s) %s\n", NFSFILEW, nfs_get_error(nfs));
- exit(10);
- }
- ret = nfs_fsync(nfs, nfsfh);
- if (ret < 0) {
- printf("Failed to fsync(%s) %s\n", NFSFILEW, nfs_get_error(nfs));
- exit(10);
- }
- ret = nfs_close(nfs, nfsfh);
- if (ret < 0) {
- printf("Failed to close(%s) %s\n", NFSFILEW, nfs_get_error(nfs));
- exit(10);
- }
-
-
- ret = nfs_statvfs(nfs, NFSDIR, &svfs);
- if (ret < 0) {
- printf("Failed to statvfs(%s) %s\n", NFSDIR, nfs_get_error(nfs));
- exit(10);