Skip to content

Commit

Permalink
!2539 bug fix: Isula ps not display N/A when ports empty
Browse files Browse the repository at this point in the history
From: @wu-jichao123 
Reviewed-by: @xuxuepeng, @liuxu180400617, @taotao-sauce 
Signed-off-by: @taotao-sauce
  • Loading branch information
openeuler-ci-bot authored and gitee-org committed Nov 27, 2024
2 parents 532988b + f55efff commit 67cd3a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/isula/information/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit 67cd3a1

Please sign in to comment.