+static inline
+int write_bool_field(struct fs_sink_stream *stream,
+ struct fs_sink_ctf_field_class_int *fc, const bt_field *field)
+{
+ /*
+ * CTF 1.8 has no boolean field class type, so this component
+ * translates this boolean field to an 8-bit unsigned integer
+ * field which has the value 0 (false) or 1 (true).
+ */
+ return bt_ctfser_write_unsigned_int(&stream->ctfser,
+ bt_field_bool_get_value(field) ? 1 : 0,
+ fc->base.base.alignment, fc->base.size, BYTE_ORDER);
+}
+
+static inline
+int write_bit_array_field(struct fs_sink_stream *stream,
+ struct fs_sink_ctf_field_class_bit_array *fc,
+ const bt_field *field)
+{
+ /*
+ * CTF 1.8 has no bit array field class type, so this component
+ * translates this bit array field to an unsigned integer field.
+ */
+ return bt_ctfser_write_unsigned_int(&stream->ctfser,
+ bt_field_bit_array_get_value_as_integer(field),
+ fc->base.alignment, fc->size, BYTE_ORDER);
+}
+