g_string_append_len(out, (gchar *)&size, sizeof(uint64_t));
for (int i = 0; i < inode->blocks->len; i++) {
BlueSkyBlock *b = &g_array_index(inode->blocks, BlueSkyBlock, i);
+ BlueSkyCloudID id;
+ memset(&id, 0, sizeof(id));
if (b->ref != NULL)
- g_string_append(out, b->ref);
- g_string_append_c(out, '\0');
+ id = b->ref->id;
+ g_string_append_len(out, (const char *)&id, sizeof(id));
}
break;
}
g_array_set_size(inode->blocks,
(inode->size + BLUESKY_BLOCK_SIZE - 1)
/ BLUESKY_BLOCK_SIZE);
+ // TODO
+#if 0
for (int i = 0; i < inode->blocks->len; i++) {
BlueSkyBlock *b = &g_array_index(inode->blocks, BlueSkyBlock, i);
b->type = BLUESKY_BLOCK_REF;
b->ref = g_strdup(buf);
buf += strlen(b->ref) + 1;
}
+#endif
break;
case BLUESKY_DIRECTORY: