Lines Matching refs:hd
48 struct data_header_t hd[NUM_STORAGE_BOXES]; /**< Header info for each entity */
76 if (key == ds.hd[kk].key) {
85 ds.hd[ds.num].key = key;
86 ds.hd[ds.num].size = size;
106 * Finds key in ds.hd[] array and returns location
113 if (key == ds.hd[kk].key) {
128 struct data_header_t *hd;
138 hd = (struct data_header_t *)data;
139 if (hd->key != DEFAULT_KEY)
141 len = MIN(hd->size, len);
142 len = hd->size;
146 if (checksum != hd->checksum)
150 hd = (struct data_header_t *)data;
151 entry = inv_find_entry(hd->key);
154 if (entry >= 0 && len >= hd->size) {
155 if (hd->size != ds.hd[entry].size)
157 checksum = inv_checksum(data, hd->size);
158 if (checksum != hd->checksum)
162 len -= hd->size;
164 data = data + hd->size;
180 struct data_header_t *hd;
187 hd = (struct data_header_t *)cur;
190 hd->checksum = inv_checksum(cur, ds.hd[kk].size);
191 hd->size = ds.hd[kk].size;
192 hd->key = ds.hd[kk].key;
193 cur += ds.hd[kk].size;
199 hd = (struct data_header_t *)data;
200 hd->checksum = inv_checksum(data + sizeof(struct data_header_t),
202 hd->key = DEFAULT_KEY;
203 hd->size = ds.total_size;