Changeset 262 in vbox
- Timestamp:
- Jan 24, 2007 12:05:42 PM (18 years ago)
- Location:
- trunk/src/VBox/Devices/Storage
- Files:
-
- 3 edited
-
DevATA.cpp (modified) (1 diff)
-
DrvHostBase.cpp (modified) (2 diffs)
-
VBoxHDD.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevATA.cpp
r113 r262 5407 5407 { 5408 5408 AssertMsgFailed(("Failed to attach LUN#%d. rc=%Vrc\n", pIf->iLUN, rc)); 5409 return PDMDEV_SET_ERROR(pDevIns, rc, N_("PIIX3 cannot attach drive.")); 5409 switch (rc) 5410 { 5411 case VERR_ACCESS_DENIED: 5412 /* Error already catched by DrvHostBase */ 5413 return rc; 5414 default: 5415 return PDMDevHlpVMSetError(pDevIns, rc, RT_SRC_POS, N_( 5416 "PIIX3 cannot attach drive to the %s"), s_apszDescs[i][j]); 5417 } 5410 5418 } 5411 5419 cbTotalBuffer += pIf->cbIOBuffer; -
trunk/src/VBox/Devices/Storage/DrvHostBase.cpp
r1 r262 93 93 #include <iprt/assert.h> 94 94 #include <iprt/file.h> 95 #include <iprt/path.h> 95 96 #include <iprt/string.h> 96 97 #include <iprt/thread.h> … … 1199 1200 if (VBOX_FAILURE(rc)) 1200 1201 { 1202 char pszPathReal[256]; 1203 char *pszDevice = pThis->pszDevice; 1204 if (RT_SUCCESS(RTPathReal(pszDevice, pszPathReal, sizeof(pszPathReal)))) 1205 pszDevice = pszPathReal; 1201 1206 AssertMsgFailed(("Could not open host device %s, rc=%Vrc\n", pThis->pszDevice, rc)); 1202 1207 pThis->FileDevice = NIL_RTFILE; 1203 return rc; 1208 switch (rc) 1209 { 1210 case VERR_ACCESS_DENIED: 1211 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, 1212 #ifdef __LINUX__ 1213 N_("Cannot open host device '%s' for %s access. Check the permissions " 1214 "of that device ('/bin/ls -l %s'): Most probably you need to be member " 1215 "of the device group. Make sure that you logout/login after changing " 1216 "the group settings of the current user"), 1217 #else 1218 N_("Cannot open host device '%s' for %s access. Check the permissions " 1219 "of that device"), 1220 #endif 1221 pszPathReal, pThis->fReadOnlyConfig ? "readonly" : "read/write", 1222 pszPathReal); 1223 default: 1224 return rc; 1225 } 1204 1226 } 1205 1227 #ifdef __WIN__ -
trunk/src/VBox/Devices/Storage/VBoxHDD.cpp
r150 r262 4199 4199 LogFlow(("vdiConstruct:\n")); 4200 4200 PVDIDISK pData = PDMINS2DATA(pDrvIns, PVDIDISK); 4201 char *pszName; /**< The path of the disk image file. */ 4202 bool fReadOnly; /**< True if the media is readonly. */ 4201 4203 4202 4204 /* … … 4249 4251 * Read the image configuration. 4250 4252 */ 4251 char *pszName;4252 4253 int rc = CFGMR3QueryStringAlloc(pCurNode, "Path", &pszName); 4253 4254 if (VBOX_FAILURE(rc)) … … 4289 4290 * Validate and read top level configuration. 4290 4291 */ 4291 char *pszName;4292 4292 int rc = CFGMR3QueryStringAlloc(pCfgHandle, "Path", &pszName); 4293 4293 if (VBOX_FAILURE(rc)) … … 4295 4295 N_("VHDD: Configuration error: Querying \"Path\" as string failed")); 4296 4296 4297 /** True if the media is readonly. */4298 bool fReadOnly;4299 4297 rc = CFGMR3QueryBool(pCfgHandle, "ReadOnly", &fReadOnly); 4300 4298 if (rc == VERR_CFGM_VALUE_NOT_FOUND) … … 4320 4318 pszName = NULL; 4321 4319 #endif 4320 4321 if (rc == VERR_ACCESS_DENIED) 4322 /* This should never happen here since this case is covered by Console::PowerUp */ 4323 return PDMDrvHlpVMSetError(pDrvIns, rc, RT_SRC_POS, 4324 N_("Cannot open virtual disk image '%s' for %s access"), 4325 pszName, fReadOnly ? "readonly" : "read/write"); 4322 4326 4323 4327 return rc;
Note:
See TracChangeset
for help on using the changeset viewer.

