mirror of
https://github.com/git/git
synced 2024-08-27 11:39:22 +00:00
builtin/help.c: use warning_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
6da31d7f75
commit
574774980c
|
@ -127,7 +127,7 @@ static void exec_woman_emacs(const char *path, const char *page)
|
||||||
path = "emacsclient";
|
path = "emacsclient";
|
||||||
strbuf_addf(&man_page, "(woman \"%s\")", page);
|
strbuf_addf(&man_page, "(woman \"%s\")", page);
|
||||||
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
|
execlp(path, "emacsclient", "-e", man_page.buf, (char *)NULL);
|
||||||
warning(_("failed to exec '%s': %s"), path, strerror(errno));
|
warning_errno(_("failed to exec '%s'"), path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ static void exec_man_konqueror(const char *path, const char *page)
|
||||||
path = "kfmclient";
|
path = "kfmclient";
|
||||||
strbuf_addf(&man_page, "man:%s(1)", page);
|
strbuf_addf(&man_page, "man:%s(1)", page);
|
||||||
execlp(path, filename, "newTab", man_page.buf, (char *)NULL);
|
execlp(path, filename, "newTab", man_page.buf, (char *)NULL);
|
||||||
warning(_("failed to exec '%s': %s"), path, strerror(errno));
|
warning_errno(_("failed to exec '%s'"), path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@ static void exec_man_man(const char *path, const char *page)
|
||||||
if (!path)
|
if (!path)
|
||||||
path = "man";
|
path = "man";
|
||||||
execlp(path, "man", page, (char *)NULL);
|
execlp(path, "man", page, (char *)NULL);
|
||||||
warning(_("failed to exec '%s': %s"), path, strerror(errno));
|
warning_errno(_("failed to exec '%s'"), path);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void exec_man_cmd(const char *cmd, const char *page)
|
static void exec_man_cmd(const char *cmd, const char *page)
|
||||||
|
@ -165,7 +165,7 @@ static void exec_man_cmd(const char *cmd, const char *page)
|
||||||
struct strbuf shell_cmd = STRBUF_INIT;
|
struct strbuf shell_cmd = STRBUF_INIT;
|
||||||
strbuf_addf(&shell_cmd, "%s %s", cmd, page);
|
strbuf_addf(&shell_cmd, "%s %s", cmd, page);
|
||||||
execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL);
|
execl(SHELL_PATH, SHELL_PATH, "-c", shell_cmd.buf, (char *)NULL);
|
||||||
warning(_("failed to exec '%s': %s"), cmd, strerror(errno));
|
warning(_("failed to exec '%s'"), cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void add_man_viewer(const char *name)
|
static void add_man_viewer(const char *name)
|
||||||
|
|
Loading…
Reference in a new issue