mirror of
https://github.com/varun-r-mallya/sysprof.git
synced 2025-12-31 20:36:25 +00:00
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:
@ -134,7 +134,6 @@ merge_files (gint argc,
|
||||
for (guint i = 1; i < argc; i++)
|
||||
{
|
||||
g_autoptr(SysprofCaptureReader) reader = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
if (!(reader = sysprof_capture_reader_new (argv[i])))
|
||||
{
|
||||
@ -144,10 +143,11 @@ merge_files (gint argc,
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (!sysprof_capture_writer_cat (writer, reader, &error))
|
||||
if (!sysprof_capture_writer_cat (writer, reader))
|
||||
{
|
||||
int errsv = errno;
|
||||
g_printerr ("Failed to join \"%s\": %s\n",
|
||||
argv[i], error->message);
|
||||
argv[i], g_strerror (errsv));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user