This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/cgit.cgi/v4l-utils.git tree:

Subject: ir-ctl: rename record to receive
Author:  Sean Young <s...@mess.org>
Date:    Thu Nov 30 23:04:06 2017 +0000

In order to be consistent with the lirc api, use receive rather than record.

Signed-off-by: Sean Young <s...@mess.org>

 utils/ir-ctl/ir-ctl.1.in | 18 ++++++++--------
 utils/ir-ctl/ir-ctl.c    | 56 ++++++++++++++++++++++++------------------------
 2 files changed, 37 insertions(+), 37 deletions(-)

---

http://git.linuxtv.org/cgit.cgi/v4l-utils.git/commit/?id=96b82146c63dbe3fd025910053fb2aac28feb154
diff --git a/utils/ir-ctl/ir-ctl.1.in b/utils/ir-ctl/ir-ctl.1.in
index 641b11152ebb..eb744abf7c35 100644
--- a/utils/ir-ctl/ir-ctl.1.in
+++ b/utils/ir-ctl/ir-ctl.1.in
@@ -15,10 +15,10 @@ ir\-ctl \- a swiss\-knife tool to handle raw IR and to set 
lirc options
 [\fIOPTION\fR]... \fI\-\-scancode\fR [\fIprotocol and scancode to send\fR]
 .br
 .B ir\-ctl
-[\fIOPTION\fR]... \fI\-\-record\fR [\fIsave to file\fR]
+[\fIOPTION\fR]... \fI\-\-receive\fR [\fIsave to file\fR]
 .SH DESCRIPTION
 ir\-ctl is a tool that allows one to list the features of a lirc device,
-set its options, record raw IR, send raw IR or send complete IR scancodes.
+set its options, receive raw IR, send raw IR or send complete IR scancodes.
 .PP
 Note: You need to have read or write permissions on the /dev/lirc device
 for options to work.
@@ -30,8 +30,8 @@ lirc device to control, /dev/lirc0 by default
 \fB\-f\fR, \fB\-\-features\fR
 List the features of the lirc device.
 .TP
-\fB\-r\fR, \fB\-\-record\fR=[\fIFILE\fR]
-Record IR and print to standard output if no file is specified, else
+\fB\-r\fR, \fB\-\-receive\fR=[\fIFILE\fR]
+Receive IR and print to standard output if no file is specified, else
 save to the filename.
 .TP
 \fB\-s\fR, \fB\-\-send\fR=\fIFILE\fR
@@ -44,7 +44,7 @@ Send the IR scancode in the protocol specified. The protocol 
must one of
 the protocols listed below, followed by a semicolon and the scancode number.
 .TP
 \fB\-1\fR, \fB\-\-oneshot\fR
-When recording, stop recording after the first message, i.e. after a space or
+When receiving, stop receiving after the first message, i.e. after a space or
 timeout of more than 19ms is received.
 .TP
 \fB\-w\fR, \fB\-\-wideband\fR
@@ -62,7 +62,7 @@ specified in the form \fI30000-50000\fR.
 .TP
 \fB\-m\fR, \fB\-\-measure\-carrier\fR
 If the hardware supports it, report what the carrier frequency is on
-recording. You will get the keyword \fIcarrier\fR followed by the frequency.
+receiving. You will get the keyword \fIcarrier\fR followed by the frequency.
 This might use the wideband receiver although this is hardware specific.
 .TP
 \fB\-M\fR, \fB\-\-no\-measure\-carrier\fR
@@ -71,7 +71,7 @@ to use the narrowband receiver. This is the default.
 .TP
 \fB\-p\fR, \fB\-\-timeout\-reports\fR
 When the IR receiver times out due to inactivity, a timeout message is
-reported. When recording you will get the keyword \fItimeout\fR followed by
+reported. When receiving you will get the keyword \fItimeout\fR followed by
 the length of time that no IR was detected for.
 .TP
 \fB\-P\fR, \fB\-\-no\-timeout\-reports\fR
@@ -79,7 +79,7 @@ When the IR receiver times out due to inactivity, do not 
report this.
 This is the default.
 .TP
 \fB\-t\fR, \fB\-\-timeout\fR=\fITIMEOUT\fR
-Set the length of a space at which the recorder goes idle, specified in
+Set the length of a space at which the receiver goes idle, specified in
 microseconds.
 .TP
 \fB\-c\fR, \fB\-\-carrier\fR=\fICARRIER\fR
@@ -214,7 +214,7 @@ To show the IR of the first button press on a remote in 
learning mode:
 .br
        \fBir\-ctl \-r \-m \-w\fR
 .PP
-Note that \fBir\-ctl \-rmw\fR would record to a file called \fBmw\fR.
+Note that \fBir\-ctl \-rmw\fR would receive to a file called \fBmw\fR.
 .PP
 To restore the normal (longer distance) receiver:
 .br
diff --git a/utils/ir-ctl/ir-ctl.c b/utils/ir-ctl/ir-ctl.c
index 6fb05b1aaa78..ab2440b0f3d3 100644
--- a/utils/ir-ctl/ir-ctl.c
+++ b/utils/ir-ctl/ir-ctl.c
@@ -1,5 +1,5 @@
 /*
- *  ir-ctl.c - Program to send and record IR using lirc interface
+ *  ir-ctl.c - Program to send and receive IR using lirc interface
  *
  *  Copyright (C) 2016 Sean Young <s...@mess.org>
  *
@@ -74,7 +74,7 @@ struct file {
 struct arguments {
        char *device;
        bool features;
-       bool record;
+       bool receive;
        bool verbose;
        struct file *send;
        bool oneshot;
@@ -94,12 +94,12 @@ struct arguments {
 static const struct argp_option options[] = {
        { "device",     'd',    N_("DEV"),      0,      N_("lirc device to 
use") },
        { "features",   'f',    0,              0,      N_("list lirc device 
features") },
-       { "record",     'r',    N_("FILE"),     OPTION_ARG_OPTIONAL,    
N_("record IR to stdout or file") },
+       { "receive",    'r',    N_("FILE"),     OPTION_ARG_OPTIONAL,    
N_("receive IR to stdout or file") },
        { "send",       's',    N_("FILE"),     0,      N_("send IR pulse and 
space file") },
        { "scancode", 'S',      N_("SCANCODE"), 0,      N_("send IR scancode in 
protocol specified") },
        { "verbose",    'v',    0,              0,      N_("verbose output") },
                { .doc = N_("Recording options:") },
-       { "one-shot",   '1',    0,              0,      N_("end recording after 
first message") },
+       { "one-shot",   '1',    0,              0,      N_("end receiving after 
first message") },
        { "wideband",   'w',    0,              0,      N_("use wideband 
receiver aka learning mode") },
        { "no-wideband",'n',    0,              0,      N_("use normal 
narrowband receiver, disable learning mode") },
        { "carrier-range", 'R', N_("RANGE"),    0,      N_("set receiver 
carrier range") },
@@ -107,7 +107,7 @@ static const struct argp_option options[] = {
        { "no-measure-carrier", 'M', 0,         0,      N_("disable reporting 
carrier frequency") },
        { "timeout-reports", 'p', 0,            0,      N_("report when a 
timeout occurs") },
        { "no-timeout-reports", 'P', 0,         0,      N_("disable reporting 
when a timeout occurs") },
-       { "timeout",    't',    N_("TIMEOUT"),  0,      N_("set recording 
timeout") },
+       { "timeout",    't',    N_("TIMEOUT"),  0,      N_("set receiving 
timeout") },
                { .doc = N_("Sending options:") },
        { "carrier",    'c',    N_("CARRIER"),  0,      N_("set send carrier") 
},
        { "duty-cycle", 'D',    N_("DUTY"),     0,      N_("set duty cycle") },
@@ -118,7 +118,7 @@ static const struct argp_option options[] = {
 
 static const char args_doc[] = N_(
        "--features\n"
-       "--record [save to file]\n"
+       "--receive [save to file]\n"
        "--send [file to send]\n"
        "--scancode [scancode to send]\n"
        "[to set lirc option]");
@@ -134,7 +134,7 @@ static const char doc[] = N_(
        "  EMITTERS - comma separated list of emitters to use for sending, e.g. 
1,2\n"
        "  GAP      - gap between pulse and files or scancodes in 
microseconds\n"
        "  RANGE    - set range of accepted carrier frequencies, e.g. 
20000-40000\n"
-       "  TIMEOUT  - set length of space before recording stops in 
microseconds\n"
+       "  TIMEOUT  - set length of space before receiving stops in 
microseconds\n"
        "  SCANCODE - protocol:scancode, e.g. nec:0xa814\n\n"
        "Note that most lirc setting have global state, i.e. the device will 
remain\n"
        "in this state until set otherwise.");
@@ -395,19 +395,19 @@ static error_t parse_opt(int k, char *arg, struct 
argp_state *state)
 
        switch (k) {
        case 'f':
-               if (arguments->record || arguments->send)
-                       argp_error(state, _("features can not be combined with 
record or send option"));
+               if (arguments->receive || arguments->send)
+                       argp_error(state, _("features can not be combined with 
receive or send option"));
                arguments->features = true;
                break;
-       // recording
+       // receiving
        case 'r':
                if (arguments->features || arguments->send)
-                       argp_error(state, _("record can not be combined with 
features or send option"));
+                       argp_error(state, _("receive can not be combined with 
features or send option"));
 
-               arguments->record = true;
+               arguments->receive = true;
                if (arg) {
                        if (arguments->savetofile)
-                               argp_error(state, _("record filename already 
set"));
+                               argp_error(state, _("receive filename already 
set"));
 
                        arguments->savetofile = arg;
                }
@@ -500,8 +500,8 @@ static error_t parse_opt(int k, char *arg, struct 
argp_state *state)
                        argp_error(state, _("invalid duty cycle `%s'"), arg);
                break;
        case 's':
-               if (arguments->record || arguments->features)
-                       argp_error(state, _("send can not be combined with 
record or features option"));
+               if (arguments->receive || arguments->features)
+                       argp_error(state, _("send can not be combined with 
receive or features option"));
                s = read_file(arguments, arg);
                if (s == NULL)
                        exit(EX_DATAERR);
@@ -516,8 +516,8 @@ static error_t parse_opt(int k, char *arg, struct 
argp_state *state)
                }
                break;
        case 'S':
-               if (arguments->record || arguments->features)
-                       argp_error(state, _("send can not be combined with 
record or features option"));
+               if (arguments->receive || arguments->features)
+                       argp_error(state, _("send can not be combined with 
receive or features option"));
                s = read_scancode(arg);
                if (s == NULL)
                        exit(EX_DATAERR);
@@ -609,7 +609,7 @@ static int lirc_options(struct arguments *args, int fd, 
unsigned features)
                if (features & LIRC_CAN_SET_REC_TIMEOUT) {
                        rc = ioctl(fd, LIRC_SET_REC_TIMEOUT, &args->timeout);
                        if (rc)
-                               fprintf(stderr, _("%s: failed to set recording 
timeout\n"), dev);
+                               fprintf(stderr, _("%s: failed to set receiving 
timeout\n"), dev);
                } else
                        fprintf(stderr, _("%s: device does not support setting 
timeout\n"), dev);
        }
@@ -709,20 +709,20 @@ static void lirc_features(struct arguments *args, int fd, 
unsigned features)
                        unsigned min_timeout, max_timeout;
                        int rc = ioctl(fd, LIRC_GET_MIN_TIMEOUT, &min_timeout);
                        if (rc) {
-                               fprintf(stderr, _("warning: %s: device supports 
setting recording timeout but LIRC_GET_MIN_TIMEOUT returns: %m\n"), dev);
+                               fprintf(stderr, _("warning: %s: device supports 
setting receiving timeout but LIRC_GET_MIN_TIMEOUT returns: %m\n"), dev);
                                min_timeout = 0;
                        } else if (min_timeout == 0)
-                               fprintf(stderr, _("warning: %s: device supports 
setting recording timeout but min timeout is 0\n"), dev);
+                               fprintf(stderr, _("warning: %s: device supports 
setting receiving timeout but min timeout is 0\n"), dev);
                        rc = ioctl(fd, LIRC_GET_MAX_TIMEOUT, &max_timeout);
                        if (rc) {
-                               fprintf(stderr, _("warning: %s: device supports 
setting recording timeout but LIRC_GET_MAX_TIMEOUT returns: %m\n"), dev);
+                               fprintf(stderr, _("warning: %s: device supports 
setting receiving timeout but LIRC_GET_MAX_TIMEOUT returns: %m\n"), dev);
                                max_timeout = 0;
                        } else if (max_timeout == 0) {
-                               fprintf(stderr, _("warning: %s: device supports 
setting recording timeout but max timeout is 0\n"), dev);
+                               fprintf(stderr, _("warning: %s: device supports 
setting receiving timeout but max timeout is 0\n"), dev);
                        }
 
                        if (min_timeout || max_timeout)
-                               printf(_(" - Can set recording timeout min:%u 
microseconds max:%u microseconds\n"), min_timeout, max_timeout);
+                               printf(_(" - Can set receiving timeout min:%u 
microseconds max:%u microseconds\n"), min_timeout, max_timeout);
                }
        } else if (features & LIRC_CAN_REC_LIRCCODE) {
                printf(_(" - Device can receive using device dependent LIRCCODE 
mode (not supported)\n"));
@@ -800,7 +800,7 @@ static int lirc_send(struct arguments *args, int fd, 
unsigned features, struct f
        return 0;
 }
 
-int lirc_record(struct arguments *args, int fd, unsigned features)
+int lirc_receive(struct arguments *args, int fd, unsigned features)
 {
        char *dev = args->device;
        FILE *out = stdout;
@@ -808,13 +808,13 @@ int lirc_record(struct arguments *args, int fd, unsigned 
features)
        int mode = LIRC_MODE_MODE2;
 
        if (!(features & LIRC_CAN_REC_MODE2)) {
-               fprintf(stderr, _("%s: device cannot record raw ir\n"), dev);
+               fprintf(stderr, _("%s: device cannot receive raw ir\n"), dev);
                return EX_UNAVAILABLE;
        }
 
        // kernel v4.8 and v4.9 return ENOTTY
        if (ioctl(fd, LIRC_SET_REC_MODE, &mode) && errno != ENOTTY) {
-               fprintf(stderr, _("%s: failed to set record mode: %m\n"), dev);
+               fprintf(stderr, _("%s: failed to set receive mode: %m\n"), dev);
                return EX_IOERR;
        }
 
@@ -932,8 +932,8 @@ int main(int argc, char *argv[])
                s = next;
        }
 
-       if (args.record) {
-               rc = lirc_record(&args, fd, features);
+       if (args.receive) {
+               rc = lirc_receive(&args, fd, features);
                if (rc) {
                        close(fd);
                        exit(rc);

_______________________________________________
linuxtv-commits mailing list
linuxtv-commits@linuxtv.org
https://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to