sysprof/0028-sysprof-live-unwinder-error-out-on-capture-failure.patch
Christian Hergert f3ac1f58a2 update patches to sysprof-el10 branch
We now have a branch upstream for tracking el10 patches which makes this
a lot easier to maintain. This updates to using that branch as a diff
upon 47.1.

Resolves: RHEL-65743
2024-11-13 16:29:35 -08:00

32 lines
1012 B
Diff

From 6cdafd91ef71b15af66107b37a5db6b5a3dcd319 Mon Sep 17 00:00:00 2001
From: Christian Hergert <chergert@redhat.com>
Date: Wed, 13 Nov 2024 15:41:33 -0800
Subject: [PATCH 28/31] sysprof-live-unwinder: error out on capture failure
---
src/sysprof-live-unwinder/main.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/sysprof-live-unwinder/main.c b/src/sysprof-live-unwinder/main.c
index e14eaf6c..a1cd53fa 100644
--- a/src/sysprof-live-unwinder/main.c
+++ b/src/sysprof-live-unwinder/main.c
@@ -708,7 +708,13 @@ Examples:\n\
return EXIT_FAILURE;
}
- writer = sysprof_capture_writer_new_from_fd (g_steal_fd (&capture_fd), CAPTURE_BUFFER_SIZE);
+ if (!(writer = sysprof_capture_writer_new_from_fd (g_steal_fd (&capture_fd), CAPTURE_BUFFER_SIZE)))
+ {
+ int errsv = errno;
+ g_printerr ("Failed to create capture writer: %s\n",
+ g_strerror (errsv));
+ return EXIT_FAILURE;
+ }
if (all_perf_fds->len == 0)
{
--
2.45.2