Changeset 31203 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Jul 29, 2010 12:44:41 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 64205
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/linux/sharedfolders/vbsfmount.c
r31202 r31203 29 29 /** @todo Use defines for return values! */ 30 30 int vbsfmount_complete(const char *host_name, const char *mount_point, 31 31 unsigned long flags, struct vbsf_mount_opts *opts) 32 32 { 33 33 FILE *f, *m; … … 35 35 size_t size; 36 36 struct mntent e; 37 37 int rc = 0; 38 38 39 39 m = open_memstream(&buf, &size); … … 65 65 f = setmntent(MOUNTED, "a+"); 66 66 if (!f) 67 68 69 70 71 72 73 74 75 76 77 67 { 68 rc = 2; /* Could not open mount table for update. */ 69 } 70 else 71 { 72 e.mnt_fsname = (char*)host_name; 73 e.mnt_dir = (char*)mount_point; 74 e.mnt_type = "vboxsf"; 75 e.mnt_opts = buf; 76 e.mnt_freq = 0; 77 e.mnt_passno = 0; 78 78 79 80 79 if (addmntent(f, &e)) 80 rc = 3; /* Could not add an entry to the mount table. */ 81 81 82 83 82 endmntent(f); 83 } 84 84 85 85 if (size > 0) … … 89 89 } 90 90 91 91 return rc; 92 92 }
Note:
See TracChangeset
for help on using the changeset viewer.