Thread (48 messages) flat view 48 messages, 5 authors, 2021-11-26
STALE1758d

[PATCH 1/5] archive-tar: use our own cmd.buf in error message

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2021-11-22 16:04:21
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Use the "cmd.buf" we just created in this function, instead of the
argv[0], which we assigned "cmd.buf" for. This is in preparation for
getting rid of the use of "argv" in this function.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 archive-tar.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/archive-tar.c b/archive-tar.c
index 05d2455870d..4154d9a0953 100644
--- a/archive-tar.c
+++ b/archive-tar.c
@@ -447,7 +447,7 @@ static int write_tar_filter_archive(const struct archiver *ar,
 	filter.in = -1;
 
 	if (start_command(&filter) < 0)
-		die_errno(_("unable to start '%s' filter"), argv[0]);
+		die_errno(_("unable to start '%s' filter"), cmd.buf);
 	close(1);
 	if (dup2(filter.in, 1) < 0)
 		die_errno(_("unable to redirect descriptor"));
@@ -457,7 +457,7 @@ static int write_tar_filter_archive(const struct archiver *ar,
 
 	close(1);
 	if (finish_command(&filter) != 0)
-		die(_("'%s' filter reported error"), argv[0]);
+		die(_("'%s' filter reported error"), cmd.buf);
 
 	strbuf_release(&cmd);
 	return r;
-- 
2.34.0.822.gb876f875f1b
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help