+static int print_chunk_table(struct ls_data *d, struct para_buffer *b)
+{
+ struct osl_object chunk_table_obj;
+ struct osl_row *aft_row;
+ int ret, i;
+ char *buf;
+
+ ret = aft_get_row_of_hash(d->hash, &aft_row);
+ if (ret < 0)
+ return ret;
+ ret = osl_open_disk_object(audio_file_table, aft_row,
+ AFTCOL_CHUNKS, &chunk_table_obj);
+ if (ret < 0)
+ return ret;
+ ret = para_printf(b, "%s\n"
+ "chunk_time: %lu:%lu\nchunk_offsets: ",
+ d->path,
+ (long unsigned) d->afhi.chunk_tv.tv_sec,
+ (long unsigned) d->afhi.chunk_tv.tv_usec
+ );
+ if (ret < 0)
+ goto out;
+ buf = chunk_table_obj.data;
+ for (i = 0; i <= d->afhi.chunks_total; i++) {
+ ret = para_printf(b, "%u ", (unsigned) read_u32(buf + 4 * i));
+ if (ret < 0)
+ goto out;
+ }
+ ret = para_printf(b, "\n");
+out:
+ osl_close_disk_object(&chunk_table_obj);
+ return ret;
+}
+