libsysprof-capture: Drop GError usage from SysprofCaptureReader

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:56:12 +01:00
parent fde278fb7f
commit e19d70bca0
19 changed files with 114 additions and 131 deletions

View File

@ -43,8 +43,12 @@ main (gint argc,
g_ptr_array_add (resolvers, sysprof_jitmap_symbol_resolver_new ());
g_ptr_array_add (resolvers, sysprof_kernel_symbol_resolver_new ());
if (!(reader = sysprof_capture_reader_new (filename, &error)))
g_error ("%s", error->message);
if (!(reader = sysprof_capture_reader_new (filename)))
{
int errsv = errno;
g_error ("%s", g_strerror (errsv));
return 1;
}
for (guint r = 0; r < resolvers->len; r++)
{