Changeset 6716 in vbox
- Timestamp:
- Feb 1, 2008 12:53:34 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/shflsvc.h
r6384 r6716 946 946 * True (default) if the folder is writable. 947 947 */ 948 HGCMFunctionParameter writable; 948 949 949 950 } VBoxSFAddMapping; -
trunk/src/VBox/Frontends/VBoxBFE/VBoxBFE.cpp
r5999 r6716 177 177 static const char *g_pszShareDir[MaxSharedFolders]; 178 178 static const char *g_pszShareName[MaxSharedFolders]; 179 static bool g_fShareReadOnly[MaxSharedFolders]; 179 180 static unsigned g_uNumShares; 180 181 static bool g_fPreAllocRam = false; … … 361 362 " -restore Restore the VM if the statefile exists, normal start otherwise\n" 362 363 " -nofstoggle Forbid switching to/from fullscreen mode\n" 363 " -share <dir><name> Share directory <dir> as name <name>\n" 364 " -share <dir> <name> [readonly]\n" 365 " Share directory <dir> as name <name>. Optionally read-only.\n" 364 366 " -nohostkey Disable hostkey\n" 365 367 " -[no]acpi Enable or disable ACPI (default: enabled)\n" … … 543 545 return SyntaxError("missing 2nd argument for share!\n"); 544 546 g_pszShareName[g_uNumShares] = argv[curArg]; 547 if (curArg < argc-1 && strcmp(argv[curArg+1], "readonly") == 0) 548 { 549 g_fShareReadOnly[g_uNumShares] = true; 550 curArg++; 551 } 545 552 g_uNumShares++; 546 553 } … … 1172 1179 for (unsigned i=0; i<g_uNumShares; i++) 1173 1180 { 1174 VBOXHGCMSVCPARM parms[ 2];1181 VBOXHGCMSVCPARM parms[SHFL_CPARMS_ADD_MAPPING]; 1175 1182 SHFLSTRING *pFolderName, *pMapName; 1176 1183 int cbString; … … 1207 1214 parms[1].u.pointer.size = sizeof (SHFLSTRING) + cbString; 1208 1215 1216 parms[2].type = VBOX_HGCM_SVC_PARM_32BIT; 1217 parms[2].u.uint32 = !g_fShareReadOnly[i]; 1218 1209 1219 rc = gVMMDev->hgcmHostCall ("VBoxSharedFolders", 1210 SHFL_FN_ADD_MAPPING, 2, &parms[0]);1220 SHFL_FN_ADD_MAPPING, SHFL_CPARMS_ADD_MAPPING, &parms[0]); 1211 1221 AssertRC(rc); 1212 1222 LogRel(("Added share %s: (%s)\n", g_pszShareName[i], g_pszShareDir[i])); -
trunk/src/VBox/HostServices/SharedFolders/testcase/tstShflSizes.cpp
r6329 r6716 76 76 STRUCT(VBoxSFRemove, 52); 77 77 STRUCT(VBoxSFRename, 64); 78 STRUCT(VBoxSFAddMapping, 4 0);78 STRUCT(VBoxSFAddMapping, 44); /* changed after 1.5.4, not critical since only used by the host */ 79 79 STRUCT(VBoxSFRemoveMapping, 28); 80 80
Note:
See TracChangeset
for help on using the changeset viewer.