Changeset 6384 in vbox for trunk/src/VBox/Frontends/VBoxManage
- Timestamp:
- Jan 18, 2008 9:15:20 PM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 27330
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
r6382 r6384 592 592 RTPrintf("VBoxManage sharedfolder add <vmname>|<uuid>\n" 593 593 " -name <name> -hostpath <hostpath>\n" 594 " [-transient] \n"594 " [-transient] [-readonly]\n" 595 595 "\n"); 596 596 } … … 1907 1907 CHECK_ERROR_RET(sfEnum, GetNext(sf.asOutParam()), rc); 1908 1908 Bstr name, hostPath; 1909 BOOL writable; 1909 1910 sf->COMGETTER(Name)(name.asOutParam()); 1910 1911 sf->COMGETTER(HostPath)(hostPath.asOutParam()); 1912 sf->COMGETTER(Writable)(&writable); 1911 1913 if (!numSharedFolders && details != VMINFO_MACHINEREADABLE) 1912 1914 RTPrintf("\n\n"); … … 1919 1921 } 1920 1922 else 1921 RTPrintf("Name: '%lS', Host path: '%lS' (machine mapping)\n", name.raw(), hostPath.raw()); 1923 RTPrintf("Name: '%lS', Host path: '%lS' (machine mapping), %s\n", 1924 name.raw(), hostPath.raw(), writable ? "writable" : "readonly"); 1922 1925 ++numSharedFolders; 1923 1926 CHECK_ERROR_RET(sfEnum, HasMore(&fMore), rc); … … 7022 7025 char *hostpath = NULL; 7023 7026 bool fTransient = false; 7027 bool fWritable = true; 7024 7028 7025 7029 for (int i = 2; i < argc; i++) … … 7042 7046 i++; 7043 7047 hostpath = argv[i]; 7044 7048 } 7049 else if (strcmp(argv[i], "-readonly") == 0) 7050 { 7051 fWritable = false; 7045 7052 } 7046 7053 else if (strcmp(argv[i], "-transient") == 0) … … 7071 7078 CHECK_ERROR_RET(aSession, COMGETTER(Console)(console.asOutParam()), 1); 7072 7079 7073 CHECK_ERROR(console, CreateSharedFolder(Bstr(name), Bstr(hostpath) ));7080 CHECK_ERROR(console, CreateSharedFolder(Bstr(name), Bstr(hostpath), fWritable)); 7074 7081 7075 7082 if (console) … … 7084 7091 aSession->COMGETTER(Machine)(machine.asOutParam()); 7085 7092 7086 CHECK_ERROR(machine, CreateSharedFolder(Bstr(name), Bstr(hostpath) ));7093 CHECK_ERROR(machine, CreateSharedFolder(Bstr(name), Bstr(hostpath), fWritable)); 7087 7094 7088 7095 if (SUCCEEDED(rc))
Note:
See TracChangeset
for help on using the changeset viewer.