From 2295e96f69a8c13751ba69ea9176b0599c0909a8 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Sat, 11 Jan 2025 14:20:43 +0000 Subject: automatic import of iSulad --- ...Isula-ps-not-display-N-A-when-ports-empty.patch | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 0160-bug-fix-Isula-ps-not-display-N-A-when-ports-empty.patch (limited to '0160-bug-fix-Isula-ps-not-display-N-A-when-ports-empty.patch') diff --git a/0160-bug-fix-Isula-ps-not-display-N-A-when-ports-empty.patch b/0160-bug-fix-Isula-ps-not-display-N-A-when-ports-empty.patch new file mode 100644 index 0000000..9551235 --- /dev/null +++ b/0160-bug-fix-Isula-ps-not-display-N-A-when-ports-empty.patch @@ -0,0 +1,25 @@ +From f55efffaeb1f28ac4e4e1b60b820b2b4694067b4 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?=E6=AD=A6=E7=A7=AF=E8=B6=85?= +Date: Tue, 26 Nov 2024 20:29:29 +0800 +Subject: [PATCH 02/19] bug fix: Isula ps not display N/A when ports empty + +--- + src/cmd/isula/information/ps.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/cmd/isula/information/ps.c b/src/cmd/isula/information/ps.c +index 6bdc157f..5f46ef22 100644 +--- a/src/cmd/isula/information/ps.c ++++ b/src/cmd/isula/information/ps.c +@@ -332,7 +332,7 @@ static void print_basic_container_info_item(const struct isula_container_summary + } else if (strcmp(name, "Created") == 0) { + print_created_field(in->created, length->created_length); + } else if (strcmp(name, "Ports") == 0) { +- const char *ports = (in->ports != NULL ? in->ports : "N/A"); ++ const char *ports = (in->ports != NULL ? in->ports : " "); + printf("%-*s", (int)length->ports_length, ports); + } + } +-- +2.23.0 + -- cgit v1.2.3