MCPcopy Create free account
hub / github.com/F-Stack/f-stack / db_put_value

Function db_put_value

freebsd/ddb/db_access.c:85–106  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void
86db_put_value(db_addr_t addr, int size, db_expr_t value)
87{
88 char data[sizeof(int)];
89 int i;
90
91#if _BYTE_ORDER == _BIG_ENDIAN
92 for (i = size - 1; i >= 0; i--)
93#else /* _LITTLE_ENDIAN */
94 for (i = 0; i < size; i++)
95#endif
96 {
97 data[i] = value & 0xFF;
98 value >>= 8;
99 }
100
101 if (db_write_bytes(addr, size, data) != 0) {
102 db_printf("*** error writing to address %llx ***\n",
103 (long long)addr);
104 kdb_reenter();
105 }
106}

Callers 1

db_write_cmdFunction · 0.85

Calls 3

db_printfFunction · 0.85
kdb_reenterFunction · 0.85
db_write_bytesFunction · 0.50

Tested by

no test coverage detected