重命名为 xy_run_get_stdout()

This commit is contained in:
Aoran Zeng 2025-08-27 14:52:54 +08:00
parent afc4ba3d06
commit cf07b13776
No known key found for this signature in database
GPG Key ID: 8F8BA8488E10ED98
2 changed files with 3 additions and 3 deletions

View File

@ -862,7 +862,7 @@ xy_run_get_status (char *cmd)
* @return
*/
static int
xy_run_capture (const char *cmd, char **output)
xy_run_get_stdout (const char *cmd, char **output)
{
int cap = 8192; /* 假如1行100个字符大约支持80行输出 */
char *buf = (char *) xy_malloc0 (cap);

View File

@ -71,7 +71,7 @@ char *
pl_java_find_maven_config ()
{
char *output;
int status = xy_run_capture ("mvn -v", &output);
int status = xy_run_get_stdout ("mvn -v", &output);
if (0==status)
{
char *maven_home_line = xy_run_iter_lines ("mvn -v", 0, pl_java_is_maven_home_line);
@ -88,7 +88,7 @@ char *
pl_java_find_maven_daemon_config ()
{
char *output;
int status = xy_run_capture ("mvnd -v", &output);
int status = xy_run_get_stdout ("mvnd -v", &output);
if (0==status)
{
char *maven_home_line = xy_run_iter_lines ("mvnd -v", 0, pl_java_is_maven_home_line);