Changeset 31211 in vbox
- Timestamp:
- Jul 29, 2010 1:17:02 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceAutoMount.cpp
r31202 r31211 81 81 static int VBoxServiceAutoMountSharedFolder(const char *pszShareName, const char *pszMountPoint) 82 82 { 83 #ifdef RT_OS_SOLARIS 84 int flags = 0; /* No flags used yet. */ 85 int r = mount(pszShareName, 86 pszMountPoint, 87 flags, 88 "vboxsf", 89 NULL, /* char *dataptr */ 90 0, /* int datalen */ 91 NULL, /* char *optptr */ 92 0); /* int optlen */ 93 if (r == 0) 94 { 95 VBoxServiceVerbose(0, "VBoxServiceAutoMountWorker: Shared folder \"%s\" was mounted to \"%s\"\n", pszShareName, pszMountPoint); 96 } 97 else 98 { 99 if (errno != EBUSY) /* Share is already mounted? Then skip error msg. */ 100 VBoxServiceError("VBoxServiceAutoMountWorker: Could not mount shared folder \"%s\" to \"%s\", error = %s\n", 101 pszShareName, pszMountPoint, strerror(errno)); 102 } 103 #else /* !RT_OS_SOLARIS */ 83 104 unsigned long flags = MS_NODEV; 84 105 struct vbsf_mount_opts opts = … … 100 121 }; 101 122 102 #ifdef RT_OS_SOLARIS103 flags = 0; /* No flags used yet. */104 int r = mount(pszShareName,105 pszMountPoint,106 flags,107 "vboxsf",108 NULL, /* char *dataptr */109 0, /* int datalen */110 NULL, /* char *optptr */111 0); /* int optlen */112 if (r == 0)113 {114 VBoxServiceVerbose(0, "VBoxServiceAutoMountWorker: Shared folder \"%s\" was mounted to \"%s\"\n", pszShareName, pszMountPoint);115 }116 else117 {118 if (errno != EBUSY) /* Share is already mounted? Then skip error msg. */119 VBoxServiceError("VBoxServiceAutoMountWorker: Could not mount shared folder \"%s\" to \"%s\", error = %s\n",120 pszShareName, pszMountPoint, strerror(errno));121 }122 #else /* !RT_OS_SOLARIS */123 123 const char *szOptions = { "rw" }; 124 124 struct vbsf_mount_info_new mntinf;
Note:
See TracChangeset
for help on using the changeset viewer.

