[igt-dev] [PATCH i-g-t v2 1/8] lib/igt_frame: Rename summary fd variable

Maxime Ripard maxime at cerno.tech
Mon Mar 28 14:55:02 UTC 2022


The igt_write_frame_to_png() function takes a file descriptor to a
summary text file to write the path to the PNG it will dump the frame
to.

Since we have multiple files involved, rename the generic fd variable to
summary_fd.

Signed-off-by: Maxime Ripard <maxime at cerno.tech>
---
 lib/igt_frame.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/igt_frame.c b/lib/igt_frame.c
index 45523a79f601..03aeb24d6edb 100644
--- a/lib/igt_frame.c
+++ b/lib/igt_frame.c
@@ -57,7 +57,7 @@ bool igt_frame_dump_is_enabled(void)
 	return igt_frame_dump_path != NULL;
 }
 
-static void igt_write_frame_to_png(cairo_surface_t *surface, int fd,
+static void igt_write_frame_to_png(cairo_surface_t *surface, int summary_fd,
 				   const char *qualifier, const char *suffix)
 {
 	char path[PATH_MAX];
@@ -85,11 +85,11 @@ static void igt_write_frame_to_png(cairo_surface_t *surface, int fd,
 
 	index = strlen(path);
 
-	if (fd >= 0 && index < (PATH_MAX - 1)) {
+	if (summary_fd >= 0 && index < (PATH_MAX - 1)) {
 		path[index++] = '\n';
 		path[index] = '\0';
 
-		write(fd, path, strlen(path));
+		write(summary_fd, path, strlen(path));
 	}
 }
 
-- 
2.35.1



More information about the igt-dev mailing list