libsysprof-capture: Drop GError usage from SysprofCaptureWriter

Use `errno` instead, which is icky, but given that all of the failure
modes are from POSIX I/O functions, it’s at least in keeping with them.

This is a major API break.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

Helps: #40
This commit is contained in:
Philip Withnall
2020-07-02 12:59:53 +01:00
parent e19d70bca0
commit 45c8c95706
9 changed files with 82 additions and 99 deletions

View File

@ -207,29 +207,24 @@ SYSPROF_AVAILABLE_IN_ALL
bool sysprof_capture_writer_flush (SysprofCaptureWriter *self);
SYSPROF_AVAILABLE_IN_ALL
bool sysprof_capture_writer_save_as (SysprofCaptureWriter *self,
const char *filename,
GError **error);
const char *filename);
SYSPROF_AVAILABLE_IN_ALL
unsigned int sysprof_capture_writer_request_counter (SysprofCaptureWriter *self,
unsigned int n_counters);
SYSPROF_AVAILABLE_IN_ALL
SysprofCaptureReader *sysprof_capture_writer_create_reader (SysprofCaptureWriter *self,
GError **error);
SysprofCaptureReader *sysprof_capture_writer_create_reader (SysprofCaptureWriter *self);
SYSPROF_AVAILABLE_IN_ALL
bool sysprof_capture_writer_splice (SysprofCaptureWriter *self,
SysprofCaptureWriter *dest,
GError **error);
SysprofCaptureWriter *dest);
SYSPROF_AVAILABLE_IN_ALL
bool sysprof_capture_writer_cat (SysprofCaptureWriter *self,
SysprofCaptureReader *reader,
GError **error);
SysprofCaptureReader *reader);
SYSPROF_INTERNAL
bool _sysprof_capture_writer_add_raw (SysprofCaptureWriter *self,
const SysprofCaptureFrame *frame);
SYSPROF_INTERNAL
bool _sysprof_capture_writer_splice_from_fd (SysprofCaptureWriter *self,
int fd,
GError **error) SYSPROF_INTERNAL;
int fd) SYSPROF_INTERNAL;
SYSPROF_INTERNAL
bool _sysprof_capture_writer_set_time_range (SysprofCaptureWriter *self,
int64_t start_time,