[5/7] cli: print the description title

Submitted by Jonatan Schlag on June 19, 2017, 7:20 p.m.

Details

Message ID 1497900050-27692-5-git-send-email-jonatan.schlag@ipfire.org
State Accepted
Commit f7b8eb7307334317ec354faf439d2475d518d389
Headers show

Commit Message

Jonatan Schlag June 19, 2017, 7:20 p.m.
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
---
 src/functions/functions.cli | 11 +++++++++++
 1 file changed, 11 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/functions/functions.cli b/src/functions/functions.cli
index 5efd923..1bd99dd 100644
--- a/src/functions/functions.cli
+++ b/src/functions/functions.cli
@@ -113,6 +113,17 @@  cli_device_headline() {
 	esac
 	cli_print_fmt1 1 "Status" "${status}"
 
+	# Print the description title of the device.
+	case "${type}" in
+		port)
+			cli_print_fmt1 1 "Description" "$(port_get_description_title ${device})"
+			;;
+
+		zone)
+			cli_print_fmt1 1 "Description" "$(zone_get_description_title ${device})"
+			;;
+	esac
+
 	# Print the color of the device.
 	case "${type}" in
 		port)