-
-
- ret = nfs_statvfs(nfs, NFSDIR, &svfs);
- if (ret < 0) {
- printf("Failed to statvfs(%s) %s\n", NFSDIR, nfs_get_error(nfs));
- exit(10);
- }
- printf("files %d/%d/%d\n", (int)svfs.f_files, (int)svfs.f_ffree, (int)svfs.f_favail);
-
-
- ret = nfs_access(nfs, NFSFILE, R_OK);
- if (ret != 0) {
- printf("Failed to access(%s) %s\n", NFSFILE, nfs_get_error(nfs));
- }
-
- /* become root */
- nfs_set_auth(nfs, authunix_create("Ronnies-Laptop", 0, 0, 0, NULL));
-
- ret = nfs_link(nfs, NFSFILE, NFSFILER);
- if (ret != 0) {
- printf("Failed to link(%s) %s\n", NFSFILE, nfs_get_error(nfs));
- }
-
-
- nfs_destroy_context(nfs);
- printf("nfsclient finished\n");