g_string_append_c(out, '\0');
}
break;
+
+ case BLUESKY_DIRECTORY:
+ {
+ uint32_t seq;
+ uint64_t inum;
+ GSequenceIter *i = g_sequence_get_begin_iter(inode->dirents);
+
+ while (!g_sequence_iter_is_end(i)) {
+ BlueSkyDirent *d = g_sequence_get(i);
+
+ seq = GUINT32_TO_LE(d->cookie);
+ inum = GUINT64_TO_LE(d->inum);
+ g_string_append_len(out, (gchar *)&seq, sizeof(uint32_t));
+ g_string_append_len(out, (gchar *)&inum, sizeof(uint64_t));
+ g_string_append(out, d->name);
+ g_string_append_c(out, '\0');
+
+ i = g_sequence_iter_next(i);
+ }
+
+ seq = GUINT32_TO_LE(0);
+ g_string_append_len(out, (gchar *)&seq, sizeof(uint32_t));
+
+ break;
+ }
default:
g_warning("Serialization for inode type %d not implemented!\n",
inode->type);