public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] tools/leds: Adding '-h' and '--help' command line options to uledmon and led_hw_brightness_mon
@ 2024-08-20  7:23 Rajkumar Vadhyar
  2024-08-20  7:23 ` [PATCH 1/2] tools/leds: Add '-h' & '--help' cmd line options to uledmon Rajkumar Vadhyar
  2024-08-20  7:23 ` [PATCH 2/2] tools/leds: Add '-h' & '--help' cmd options to led_hw_brightness_mon Rajkumar Vadhyar
  0 siblings, 2 replies; 5+ messages in thread
From: Rajkumar Vadhyar @ 2024-08-20  7:23 UTC (permalink / raw)
  To: jacek.anaszewski, rbmarliere, skhan; +Cc: linux-kernel, Rajkumar Vadhyar

Hi everyone,
     This is a cover letter for a 2 patch series(uledmon.c and led_hw_brightness.c) The 2 patches 
     include option for "-h" and "--help" for the given tools.

regards,
Rajkumar

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] tools/leds: Add '-h' & '--help' cmd line options to uledmon
  2024-08-20  7:23 [PATCH 0/2] tools/leds: Adding '-h' and '--help' command line options to uledmon and led_hw_brightness_mon Rajkumar Vadhyar
@ 2024-08-20  7:23 ` Rajkumar Vadhyar
  2024-08-25 11:55   ` Jacek Anaszewski
  2024-08-20  7:23 ` [PATCH 2/2] tools/leds: Add '-h' & '--help' cmd options to led_hw_brightness_mon Rajkumar Vadhyar
  1 sibling, 1 reply; 5+ messages in thread
From: Rajkumar Vadhyar @ 2024-08-20  7:23 UTC (permalink / raw)
  To: jacek.anaszewski, rbmarliere, skhan; +Cc: linux-kernel, Rajkumar Vadhyar

Add '-h' and '--help' command line options to uledmon

Signed-off-by: Rajkumar Vadhyar <rajkumarvad@gmail.com> 
---
 tools/leds/uledmon.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/tools/leds/uledmon.c b/tools/leds/uledmon.c
index c15a39c1f271..6609235d80b0 100644
--- a/tools/leds/uledmon.c
+++ b/tools/leds/uledmon.c
@@ -11,6 +11,8 @@
  * CTRL+C will exit.
  */
 
+#define	ULEDMON_USAGE	"Usage: ./uledmon <device-name>\n"
+
 #include <fcntl.h>
 #include <stdio.h>
 #include <string.h>
@@ -19,6 +21,7 @@
 
 #include <linux/uleds.h>
 
+
 int main(int argc, char const *argv[])
 {
 	struct uleds_user_dev uleds_dev;
@@ -30,6 +33,10 @@ int main(int argc, char const *argv[])
 		fprintf(stderr, "Requires <device-name> argument\n");
 		return 1;
 	}
+	if (!(strcmp(argv[1], "-h")) || !(strcmp(argv[1], "--help"))) {
+		fprintf(stderr, ULEDMON_USAGE);
+		return 1;
+	}
 
 	strncpy(uleds_dev.name, argv[1], LED_MAX_NAME_SIZE);
 	uleds_dev.max_brightness = 100;
-- 
2.40.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] tools/leds: Add '-h' & '--help' cmd options to led_hw_brightness_mon
  2024-08-20  7:23 [PATCH 0/2] tools/leds: Adding '-h' and '--help' command line options to uledmon and led_hw_brightness_mon Rajkumar Vadhyar
  2024-08-20  7:23 ` [PATCH 1/2] tools/leds: Add '-h' & '--help' cmd line options to uledmon Rajkumar Vadhyar
@ 2024-08-20  7:23 ` Rajkumar Vadhyar
  1 sibling, 0 replies; 5+ messages in thread
From: Rajkumar Vadhyar @ 2024-08-20  7:23 UTC (permalink / raw)
  To: jacek.anaszewski, rbmarliere, skhan; +Cc: linux-kernel, Rajkumar Vadhyar

Add '-h' and '--help' command line options to led_hw_brightness_mon

Signed-off-by: Rajkumar Vadhyar <rajkumarvad@gmail.com> 
---
 tools/leds/led_hw_brightness_mon.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tools/leds/led_hw_brightness_mon.c b/tools/leds/led_hw_brightness_mon.c
index eb65ae988839..712a4f8edb98 100644
--- a/tools/leds/led_hw_brightness_mon.c
+++ b/tools/leds/led_hw_brightness_mon.c
@@ -12,6 +12,7 @@
  * CTRL+C will exit.
  */
 
+#define	USAGE_LED_HW_BRIGHTNESS_MON	"Usage: ./led_hw_brightness_mon <device-name>\n"
 #include <errno.h>
 #include <fcntl.h>
 #include <poll.h>
@@ -36,6 +37,11 @@ int main(int argc, char const *argv[])
 		return 1;
 	}
 
+	if (!(strcmp(argv[1], "-h")) || !(strcmp(argv[1], "--help"))) {
+		fprintf(stderr, USAGE_LED_HW_BRIGHTNESS_MON);
+		return 1;
+	}
+
 	snprintf(brightness_file_path, LED_MAX_NAME_SIZE,
 		 "/sys/class/leds/%s/brightness_hw_changed", argv[1]);
 
-- 
2.40.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] tools/leds: Add '-h' & '--help' cmd line options to uledmon
  2024-08-20  7:23 ` [PATCH 1/2] tools/leds: Add '-h' & '--help' cmd line options to uledmon Rajkumar Vadhyar
@ 2024-08-25 11:55   ` Jacek Anaszewski
       [not found]     ` <CAPTF_YM5CS5-5sdceU598uY16LaGy1hJMKwVmr75Cqsemjs38g@mail.gmail.com>
  0 siblings, 1 reply; 5+ messages in thread
From: Jacek Anaszewski @ 2024-08-25 11:55 UTC (permalink / raw)
  To: Rajkumar Vadhyar, rbmarliere, skhan; +Cc: linux-kernel

Hi Rajkumar,

You should send it to linux-leds@vger.kernel.org and to LEDs maintainer.

-- 
Best regards,
Jacek Anaszewski

On 8/20/24 09:23, Rajkumar Vadhyar wrote:
> Add '-h' and '--help' command line options to uledmon
> 
> Signed-off-by: Rajkumar Vadhyar <rajkumarvad@gmail.com>
> ---
>   tools/leds/uledmon.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/tools/leds/uledmon.c b/tools/leds/uledmon.c
> index c15a39c1f271..6609235d80b0 100644
> --- a/tools/leds/uledmon.c
> +++ b/tools/leds/uledmon.c
> @@ -11,6 +11,8 @@
>    * CTRL+C will exit.
>    */
>   
> +#define	ULEDMON_USAGE	"Usage: ./uledmon <device-name>\n"
> +
>   #include <fcntl.h>
>   #include <stdio.h>
>   #include <string.h>
> @@ -19,6 +21,7 @@
>   
>   #include <linux/uleds.h>
>   
> +
>   int main(int argc, char const *argv[])
>   {
>   	struct uleds_user_dev uleds_dev;
> @@ -30,6 +33,10 @@ int main(int argc, char const *argv[])
>   		fprintf(stderr, "Requires <device-name> argument\n");
>   		return 1;
>   	}
> +	if (!(strcmp(argv[1], "-h")) || !(strcmp(argv[1], "--help"))) {
> +		fprintf(stderr, ULEDMON_USAGE);
> +		return 1;
> +	}
>   
>   	strncpy(uleds_dev.name, argv[1], LED_MAX_NAME_SIZE);
>   	uleds_dev.max_brightness = 100;


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] tools/leds: Add '-h' & '--help' cmd line options to uledmon
       [not found]     ` <CAPTF_YM5CS5-5sdceU598uY16LaGy1hJMKwVmr75Cqsemjs38g@mail.gmail.com>
@ 2024-09-20 21:01       ` Jacek Anaszewski
  0 siblings, 0 replies; 5+ messages in thread
From: Jacek Anaszewski @ 2024-09-20 21:01 UTC (permalink / raw)
  To: Rajkumar Vadhyar; +Cc: Ricardo B. Marliere, Shuah Khan, linux-kernel

Hi Rajkumar,

LED maintainers are responsible also for tools/leds.
MAINTAINERS file say today the following:

LED SUBSYSTEM
M:  Pavel Machek <pavel@ucw.cz>
M:  Lee Jones <lee@kernel.org>

-- 
Best regards,
Jacek Anaszewski

On 8/26/24 05:58, Rajkumar Vadhyar wrote:
> Hi Jacek,
> Actually when I did getmaintainer.pl <http://getmaintainer.pl> on the 
> patch I was only getting the mailing list email id. Also when I did git 
> blame I saw your name as the committer of the led file so I thought you 
> might be the maintainer also.
> Would you know who is the maintainer of this tools/leds? Thank you
> 
> Regards,
> Rajkumar
> 
> On Sun, 25 Aug 2024, 17:25 Jacek Anaszewski, <jacek.anaszewski@gmail.com 
> <mailto:jacek.anaszewski@gmail.com>> wrote:
> 
>     https://www.royalmail.com/track-your-item#/tracking-results/LE879811818GB
> 
>     You should send it to linux-leds@vger.kernel.org
>     <mailto:linux-leds@vger.kernel.org> and to LEDs maintainer.
> 
>     -- 
>     Best regards,
>     Jacek Anaszewski
> 
>     On 8/20/24 09:23, Rajkumar Vadhyar wrote:
>      > Add '-h' and '--help' command line options to uledmon
>      >
>      > Signed-off-by: Rajkumar Vadhyar <rajkumarvad@gmail.com
>     <mailto:rajkumarvad@gmail.com>>
>      > ---
>      >   tools/leds/uledmon.c | 7 +++++++
>      >   1 file changed, 7 insertions(+)
>      >
>      > diff --git a/tools/leds/uledmon.c b/tools/leds/uledmon.c
>      > index c15a39c1f271..6609235d80b0 100644
>      > --- a/tools/leds/uledmon.c
>      > +++ b/tools/leds/uledmon.c
>      > @@ -11,6 +11,8 @@
>      >    * CTRL+C will exit.
>      >    */
>      >
>      > +#define      ULEDMON_USAGE   "Usage: ./uledmon <device-name>\n"
>      > +
>      >   #include <fcntl.h>
>      >   #include <stdio.h>
>      >   #include <string.h>
>      > @@ -19,6 +21,7 @@
>      >
>      >   #include <linux/uleds.h>
>      >
>      > +
>      >   int main(int argc, char const *argv[])
>      >   {
>      >       struct uleds_user_dev uleds_dev;
>      > @@ -30,6 +33,10 @@ int main(int argc, char const *argv[])
>      >               fprintf(stderr, "Requires <device-name> argument\n");
>      >               return 1;
>      >       }
>      > +     if (!(strcmp(argv[1], "-h")) || !(strcmp(argv[1], "--help"))) {
>      > +             fprintf(stderr, ULEDMON_USAGE);
>      > +             return 1;
>      > +     }
>      >
>      >       strncpy(uleds_dev.name <http://uleds_dev.name>, argv[1],
>     LED_MAX_NAME_SIZE);
>      >       uleds_dev.max_brightness = 100;
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-09-20 21:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-20  7:23 [PATCH 0/2] tools/leds: Adding '-h' and '--help' command line options to uledmon and led_hw_brightness_mon Rajkumar Vadhyar
2024-08-20  7:23 ` [PATCH 1/2] tools/leds: Add '-h' & '--help' cmd line options to uledmon Rajkumar Vadhyar
2024-08-25 11:55   ` Jacek Anaszewski
     [not found]     ` <CAPTF_YM5CS5-5sdceU598uY16LaGy1hJMKwVmr75Cqsemjs38g@mail.gmail.com>
2024-09-20 21:01       ` Jacek Anaszewski
2024-08-20  7:23 ` [PATCH 2/2] tools/leds: Add '-h' & '--help' cmd options to led_hw_brightness_mon Rajkumar Vadhyar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox