Message ID | BL3PR19MB6514010EDD5F1CA2F95E1F5CD3ABA@BL3PR19MB6514.namprd19.prod.outlook.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | How to contribute to ir-keytable/ir-ctl ? | expand |
Hello Vince, On Sun, Nov 05, 2023 at 08:23:04PM +0000, Vince Ricosti wrote: > Hello, > I would like to contribute to the infrared source code and learn the procedure for submitting patches. > My first patch is of the utmost importance :-) because here is a dump of ir-keytable output: > > Found /sys/class/rc/rc0/ with: > Name: gpio_ir_recv > Driver: gpio_ir_recv > Default keymap: rc-rc6-mce > Input device: /dev/input/event0 > LIRC device: /dev/lirc1 > Attached BPF protocols: Operation non permise > Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon > Enabled kernel protocols: lirc sony > bus: 25, vendor/product: 0001:0001, version: 0x0100 > Repeat delay = 500 ms, repeat period = 125 ms > > And what annoys me if the fact that the last line does not respect the key: value syntax because > we have > > Repeat delay = 500 ms, repeat period = 125 ms > instead of > Repeat delay: 500 ms, repeat period: 125 ms > > and because of this I cannot even write a simple python script to analyse this output without writing some ugly code > to handle this last line. > So my first patch would be: > > Signed-off-by: Vince Ricosti <vricosti@outlook.com> > --- > diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c > index 3d5a3c51..62f4531e 100644 > --- a/utils/keytable/keytable.c > +++ b/utils/keytable/keytable.c > @@ -1702,7 +1702,7 @@ static int get_rate(int fd, unsigned int *delay, unsigned int *period) > } > *delay = rep[0]; > *period = rep[1]; > - printf(_("Repeat delay = %d ms, repeat period = %d ms\n"), *delay, *period); > + printf(_("Repeat delay: %d ms, repeat period: %d ms\n"), *delay, *period); Your patch got mangled by your email client and does not work, see https://www.kernel.org/doc/html/latest/process/submitting-patches.html Secondly there are translations of this line which need updating. However, I have fixed the patch and applied it: https://git.linuxtv.org/v4l-utils.git/commit/?id=fcf62ab17d69bc9ddb59e8d0ee7a8b56d9eba336 Please next time make sure your patch is emailed correctly. Thanks, Sean
diff --git a/utils/keytable/keytable.c b/utils/keytable/keytable.c index 3d5a3c51..62f4531e 100644 --- a/utils/keytable/keytable.c +++ b/utils/keytable/keytable.c @@ -1702,7 +1702,7 @@ static int get_rate(int fd, unsigned int *delay, unsigned int *period) } *delay = rep[0]; *period = rep[1]; - printf(_("Repeat delay = %d ms, repeat period = %d ms\n"), *delay, *period); + printf(_("Repeat delay: %d ms, repeat period: %d ms\n"), *delay, *period); return 0; }
Hello, I would like to contribute to the infrared source code and learn the procedure for submitting patches. My first patch is of the utmost importance :-) because here is a dump of ir-keytable output: Found /sys/class/rc/rc0/ with: Name: gpio_ir_recv Driver: gpio_ir_recv Default keymap: rc-rc6-mce Input device: /dev/input/event0 LIRC device: /dev/lirc1 Attached BPF protocols: Operation non permise Supported kernel protocols: lirc rc-5 rc-5-sz jvc sony nec sanyo mce_kbd rc-6 sharp xmp imon Enabled kernel protocols: lirc sony bus: 25, vendor/product: 0001:0001, version: 0x0100 Repeat delay = 500 ms, repeat period = 125 ms And what annoys me if the fact that the last line does not respect the key: value syntax because we have Repeat delay = 500 ms, repeat period = 125 ms instead of Repeat delay: 500 ms, repeat period: 125 ms and because of this I cannot even write a simple python script to analyse this output without writing some ugly code to handle this last line. So my first patch would be: Signed-off-by: Vince Ricosti <vricosti@outlook.com> --- Thanks