[PATCH libgpiod v3 07/16] dbus: daemon: add a more detailed description to help text

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>

In preparation for adding man pages for the daemon and the command-line
client, add a detailed description of what gpio-manager is and does to
the output presented to user when they pass --help as argument.

Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@xxxxxxxxxx>
---
 dbus/manager/gpio-manager.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/dbus/manager/gpio-manager.c b/dbus/manager/gpio-manager.c
index d34c7ea..03ca7ab 100644
--- a/dbus/manager/gpio-manager.c
+++ b/dbus/manager/gpio-manager.c
@@ -85,6 +85,14 @@ static void print_version_and_exit(void)
 
 static void parse_opts(int argc, char **argv)
 {
+	static const char *const description =
+"The gpio-manager is the reference implementation of the GPIO D-Bus API\n"
+"built on top of libgpiod. It serves as the central authority managing GPIO\n"
+"chips and lines, exposing their functionalities to other applications\n"
+"through the D-Bus interface. It supports operations such as requesting,\n"
+"releasing, and setting line values, as well as monitoring events like rising\n"
+"or falling edges and line property changes.";
+
 	gboolean ret, opt_debug = FALSE, opt_version = FALSE;
 	g_autoptr(GOptionContext) ctx = NULL;
 	g_auto(GStrv) remaining = NULL;
@@ -118,6 +126,7 @@ static void parse_opts(int argc, char **argv)
 
 	ctx = g_option_context_new(NULL);
 	g_option_context_set_summary(ctx, "D-Bus daemon managing GPIOs.");
+	g_option_context_set_description(ctx, description);
 	g_option_context_add_main_entries(ctx, opts, NULL);
 
 	ret = g_option_context_parse(ctx, &argc, &argv, &err);

-- 
2.45.2





[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux