Changeset 81509 in vbox for trunk/src/VBox/Devices/EFI
- Timestamp:
- Oct 24, 2019 8:56:40 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 134237
- Location:
- trunk/src/VBox/Devices/EFI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/EFI/DevEFI.cpp
r81505 r81509 262 262 /** Filename of the file containing the NVRAM store. */ 263 263 char *pszNvramFile; 264 /** Flag whether the NVRAM state was saved using SSM. */265 bool fNvramStateSaved;266 264 267 265 /** … … 1979 1977 nvramFlushDeviceVariableList(pThisCC); 1980 1978 1981 if ( !pThisCC->fNvramStateSaved 1982 && pThisCC->pszNvramFile) 1979 if (pThisCC->pszNvramFile) 1983 1980 { 1984 1981 int rc = flashR3SaveToFile(&pThis->Flash, pDevIns, pThisCC->pszNvramFile); 1985 1982 if (RT_FAILURE(rc)) 1986 LogRel(("EFI: Failed to save flash file to '%s' ->%Rrc\n", pThisCC->pszNvramFile, rc));1983 LogRel(("EFI: Failed to save flash file to '%s': %Rrc\n", pThisCC->pszNvramFile, rc)); 1987 1984 } 1988 1985 -
trunk/src/VBox/Devices/EFI/DevFlash.cpp
r81502 r81509 38 38 39 39 40 /*********************************************************************************************************************************41 * Defined Constants And Macros *42 *********************************************************************************************************************************/43 44 40 45 41 /********************************************************************************************************************************* … … 55 51 /** The guest physical memory base address. */ 56 52 RTGCPHYS GCPhysFlashBase; 57 /** When set, indicates the state was saved. */58 bool fStateSaved;59 53 /** The file conaining the flash content. */ 60 54 char *pszFlashFile; 61 55 } DEVFLASH; 62 63 56 /** Pointer to the Flash device state. */ 64 57 typedef DEVFLASH *PDEVFLASH; … … 96 89 { 97 90 PDEVFLASH pThis = PDMINS_2_DATA(pDevIns, PDEVFLASH); 98 99 int rc = flashR3SaveExec(&pThis->Core, pDevIns, pSSM); 100 if (RT_SUCCESS(rc)) 101 pThis->fStateSaved = true; 102 103 return rc; 91 return flashR3SaveExec(&pThis->Core, pDevIns, pSSM); 104 92 } 105 93 … … 133 121 static DECLCALLBACK(int) flashDestruct(PPDMDEVINS pDevIns) 134 122 { 135 PDEVFLASH pThis = PDMINS_2_DATA(pDevIns, PDEVFLASH); 136 int rc; 137 138 if (!pThis->fStateSaved) 139 { 140 rc = flashR3SaveToFile(&pThis->Core, pDevIns, pThis->pszFlashFile); 141 if (RT_FAILURE(rc)) 142 LogRel(("Flash: Failed to save flash file")); 143 } 123 PDMDEV_CHECK_VERSIONS_RETURN_QUIET(pDevIns); 124 PDEVFLASH pThis = PDMINS_2_DATA(pDevIns, PDEVFLASH); 125 126 int rc = flashR3SaveToFile(&pThis->Core, pDevIns, pThis->pszFlashFile); 127 if (RT_FAILURE(rc)) 128 LogRel(("Flash: Failed to save flash file: %Rrc\n", rc)); 144 129 145 130 if (pThis->pszFlashFile) … … 158 143 static DECLCALLBACK(int) flashConstruct(PPDMDEVINS pDevIns, int iInstance, PCFGMNODE pCfg) 159 144 { 145 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns); 160 146 RT_NOREF1(iInstance); 161 PDMDEV_CHECK_VERSIONS_RETURN(pDevIns);162 147 PDEVFLASH pThis = PDMINS_2_DATA(pDevIns, PDEVFLASH); 163 148 Assert(iInstance == 0);
Note:
See TracChangeset
for help on using the changeset viewer.