From b47761e263d6d9428f098098c774f747c472530d Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 30 Aug 2026 12:02:29 -0500 Subject: [PATCH] Tweak help text and process help text normally. --- toys/pending/ucsicontrol.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/toys/pending/ucsicontrol.c b/toys/pending/ucsicontrol.c index b23048ff..949d427d 100644 --- a/toys/pending/ucsicontrol.c +++ b/toys/pending/ucsicontrol.c @@ -5,16 +5,18 @@ * Talks directly to the kernel UCSI debugfs interface exposed under * /sys/kernel/debug/usb/ucsi/.../{command,response}. -USE_UCSICONTROL(NEWTOY(ucsicontrol, 0, TOYFLAG_USR|TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) +USE_UCSICONTROL(NEWTOY(ucsicontrol, "<1&", TOYFLAG_USR|TOYFLAG_SBIN|TOYFLAG_NEEDROOT)) config UCSICONTROL bool "ucsicontrol" default n help Usage: ucsicontrol [OPTIONS] - Note: ucsicontrol must be run as root. + + Query and control USB Type-C / USB Power Delivery (PD) state from the + UCSI (USB Type-C Connector System Software Interface) driver. + Options: - --help, -h Show this help message --conn_rst Reset the Connector --get_cap Get Capabilities --get_conn_cap Get Connector Capability @@ -503,11 +505,6 @@ void ucsicontrol_main(void) char **args = toys.optargs, *op = args[0], buf[256] = {0}; int conn, n; - // Accept both "--option" and "-h" style; show help when asked or no command. - if (!op || !strcmp(op, "-h") || !strcmp(op, "--help")) { - show_help(HELP_HEADER); - xexit(); - } if (*op == '-') op += (op[1] == '-') ? 2 : 1; ucsi_open(); -- 2.39.5