Changeset 101470 in vbox for trunk/src/VBox/Runtime/common
- Timestamp:
- Oct 17, 2023 10:33:30 AM (15 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/misc/fdt.cpp
r101453 r101470 1595 1595 1596 1596 1597 RTDECL(int) RTFdtNodePropertyAddCellsU32AsArray(RTFDT hFdt, const char *pszProperty, uint32_t cCells, uint32_t *pau32Cells) 1598 { 1599 PRTFDTINT pThis = hFdt; 1600 AssertPtrReturn(pThis, VERR_INVALID_HANDLE); 1601 1602 /* Insert the property name into the strings block. */ 1603 uint32_t offStr; 1604 int rc = rtFdtStringsInsertString(pThis, pszProperty, &offStr); 1605 if (RT_FAILURE(rc)) 1606 return rc; 1607 1608 uint32_t cbProp = cCells * sizeof(uint32_t) + 3 * sizeof(uint32_t); 1609 1610 rc = rtFdtStructEnsureSpace(pThis, cbProp); 1611 if (RT_FAILURE(rc)) 1612 return rc; 1613 1614 uint32_t *pu32 = (uint32_t *)(pThis->pbStruct + pThis->cbStruct); 1615 *pu32++ = DTB_FDT_TOKEN_PROPERTY_BE; 1616 *pu32++ = RT_H2BE_U32(cCells * sizeof(uint32_t)); 1617 *pu32++ = RT_H2BE_U32(offStr); 1618 for (uint32_t i = 0; i < cCells; i++) 1619 *pu32++ = RT_H2BE_U32(pau32Cells[i]); 1620 1621 pThis->cbStruct += cbProp; 1622 return VINF_SUCCESS; 1623 } 1624 1625 1597 1626 RTDECL(int) RTFdtNodePropertyAddCellsU64(RTFDT hFdt, const char *pszProperty, uint32_t cCells, ...) 1598 1627 {
Note:
See TracChangeset
for help on using the changeset viewer.