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 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:
@ -464,14 +464,16 @@ sysprof_proxy_source_complete_monitor (SysprofProxySource *self,
|
||||
Monitor *monitor)
|
||||
{
|
||||
g_autoptr(SysprofCaptureReader) reader = NULL;
|
||||
g_autoptr(GError) error = NULL;
|
||||
|
||||
g_assert (SYSPROF_IS_PROXY_SOURCE (self));
|
||||
g_assert (monitor != NULL);
|
||||
g_assert (monitor->self == self);
|
||||
|
||||
if (!(reader = sysprof_capture_reader_new_from_fd (steal_fd (&monitor->fd), &error)))
|
||||
g_warning ("Failed to load reader from peer FD: %s", error->message);
|
||||
if (!(reader = sysprof_capture_reader_new_from_fd (steal_fd (&monitor->fd))))
|
||||
{
|
||||
int errsv = errno;
|
||||
g_warning ("Failed to load reader from peer FD: %s", g_strerror (errsv));
|
||||
}
|
||||
else
|
||||
sysprof_proxy_source_cat (self, reader);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user