Changeset 72273 in vbox for trunk/src/VBox/Runtime/tools
- Timestamp:
- May 21, 2018 12:51:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/tools/RTCp.cpp
r70442 r72273 61 61 /** -x, --one-filesystem. */ 62 62 bool fOneFileSystem; 63 64 /** Special --no-replace-nor-trucate hack for basic NTFS write support. */ 65 bool fNoReplaceNorTruncate; 63 66 64 67 /** Number of sources. */ … … 143 146 { 144 147 RTVFSFILE hVfsDst; 145 rc = RTVfsChainOpenFile(pszDst, RTFILE_O_READWRITE | RTFILE_O_CREATE_REPLACE | RTFILE_O_DENY_WRITE, 146 &hVfsDst, &offError, RTErrInfoInitStatic(&ErrInfo)); 148 uint64_t fDstFlags = (pOpts->fNoReplaceNorTruncate ? RTFILE_O_OPEN_CREATE : RTFILE_O_CREATE_REPLACE) 149 | RTFILE_O_READWRITE | RTFILE_O_DENY_WRITE | (0666 << RTFILE_O_CREATE_MODE_SHIFT); 150 rc = RTVfsChainOpenFile(pszDst, fDstFlags, &hVfsDst, &offError, RTErrInfoInitStatic(&ErrInfo)); 147 151 if (RT_SUCCESS(rc)) 148 152 { … … 240 244 { "--verbose", 'v', RTGETOPT_REQ_NOTHING }, 241 245 { "--one-file-system", 'x', RTGETOPT_REQ_NOTHING }, 246 { "--no-replace-nor-trucate", 1032, RTGETOPT_REQ_NOTHING }, 242 247 }; 243 248 … … 247 252 Opts.fRecursive = false; 248 253 Opts.fOneFileSystem = false; 254 Opts.fNoReplaceNorTruncate = false; 249 255 Opts.pszDestination = NULL; 250 256 Opts.cSources = 0; … … 303 309 break; 304 310 311 case 1032: 312 Opts.fNoReplaceNorTruncate = true; 313 break; 314 305 315 case 'h': 306 316 RTPrintf("Usage: to be written\nOption dump:\n");
Note:
See TracChangeset
for help on using the changeset viewer.