All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] Replaced get_current_dir_name() with getcwd() for BSD compatibility
@ 2022-09-18 22:39 Jake Freeland
  2022-09-19  1:54 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jake Freeland @ 2022-09-18 22:39 UTC (permalink / raw)
  To: igt-dev; +Cc: Jake Freeland

Signed-off-by: Jake Freeland <jfree@freebsd.org>
---
 tests/tools_test.c                  | 6 +++---
 tools/i915-perf/i915_perf_control.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/tests/tools_test.c b/tests/tools_test.c
index 89a19d11..d0684d57 100644
--- a/tests/tools_test.c
+++ b/tests/tools_test.c
@@ -69,7 +69,7 @@ static bool chdir_to_tools_dir(void)
 	char path[PATH_MAX];
 	char *cwd;
 
-	cwd = get_current_dir_name();
+	cwd = getcwd(NULL, 0);
 	igt_info("Current working directory: %s\n", cwd);
 	free(cwd);
 
@@ -87,7 +87,7 @@ static bool chdir_to_tools_dir(void)
 		chdir(dirname(path));
 	}
 
-	cwd = get_current_dir_name();
+	cwd = getcwd(NULL, 0);
 	igt_info("Current working directory: %s\n", cwd);
 	free(cwd);
 
@@ -103,7 +103,7 @@ igt_main
 
 		igt_require_f(chdir_to_tools_dir(),
 			      "Unable to determine the tools directory, expecting them in $cwd/" TOOLS " or $path/" TOOLS "\n");
-		path = get_current_dir_name();
+		path = getcwd(NULL, 0);
 		igt_info("Using tools from %s\n", path);
 		free(path);
 	}
diff --git a/tools/i915-perf/i915_perf_control.c b/tools/i915-perf/i915_perf_control.c
index be5996c0..f7db2f5c 100644
--- a/tools/i915-perf/i915_perf_control.c
+++ b/tools/i915-perf/i915_perf_control.c
@@ -102,7 +102,7 @@ main(int argc, char *argv[])
 
 			fwrite(data, total_len, 1, command_fifo_file);
 		} else {
-			char *cwd = get_current_dir_name();
+			char *cwd = getcwd(NULL, 0);
 			uint32_t path_len = strlen(cwd) + 1 + strlen(dump_file) + 1;
 			uint32_t total_len = sizeof(struct recorder_command_base) + path_len;
 			struct {
-- 
2.37.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-09-28 14:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-18 22:39 [igt-dev] [PATCH i-g-t] Replaced get_current_dir_name() with getcwd() for BSD compatibility Jake Freeland
2022-09-19  1:54 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2022-09-19  4:45 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2022-09-28 12:40 ` [igt-dev] [PATCH i-g-t] " Kamil Konieczny
2022-09-28 14:30   ` Jake Freeland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.