From aa50df8eaf22d4da5bd334c7a0c8d3fa437ef3bf Mon Sep 17 00:00:00 2001 From: Benjamin Tissoires Date: Wed, 19 Jul 2017 17:17:03 +0200 Subject: [PATCH] tools: ratbag-command: fix enable/disable profiles The usage help is wrong, it's not how it works. It'll be too much pain to fix it the other way around, and I prefer using "ratbag* profile N enable" than "ratbag* profile enable N". Signed-off-by: Benjamin Tissoires --- tools/ratbag-command.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/ratbag-command.c b/tools/ratbag-command.c index 4e0ba1cf..269da135 100644 --- a/tools/ratbag-command.c +++ b/tools/ratbag-command.c @@ -106,8 +106,8 @@ usage(void) "Profile Commands:\n" " profile active get Print the currently active profile\n" " profile active set N Set profile N as to the active profile\n" - " profile enable N Enable profile N\n" - " profile disable N Disable profile N\n" + " profile N enable Enable profile N\n" + " profile N disable Disable profile N\n" " profile N {COMMAND} Use profile N for COMMAND\n" "\n" "Resolution Commands\n" @@ -441,6 +441,9 @@ ratbag_cmd_info(const struct ratbag_cmd *cmd, printf(" Profile %d (%s)%s\n", i, ratbag_profile_is_enabled(profile) ? "enabled" : "disabled", ratbag_profile_is_active(profile) ? " (active)" : ""); + if (!ratbag_profile_is_enabled(profile)) + continue; + printf(" Resolutions:\n"); res = ratbag_profile_get_resolution(profile, 0);