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

Subject: rds-ctl: support -d10 to refer to radio10.
Author:  Hans Verkuil <hans.verk...@cisco.com>
Date:    Fri Jun 7 10:22:51 2013 +0200

In order to be consistent with other v4l utilities support the '-d<num>' option
for num >= 10.

Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>

 utils/rds-ctl/rds-ctl.cpp |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

---

http://git.linuxtv.org/v4l-utils.git?a=commitdiff;h=c7bdfa014bac092cc4490820708ad65da07cf15c

diff --git a/utils/rds-ctl/rds-ctl.cpp b/utils/rds-ctl/rds-ctl.cpp
index d894ec1..a9fe2a8 100644
--- a/utils/rds-ctl/rds-ctl.cpp
+++ b/utils/rds-ctl/rds-ctl.cpp
@@ -133,7 +133,7 @@ static void usage_common(void)
               "  --all              display all device information available\n"
               "  -D, --info         show driver info [VIDIOC_QUERYCAP]\n"
               "  -d, --device=<dev> use device <dev>\n"
-              "                     if <dev> is a single digit, then 
/dev/radio<dev> is used\n"
+              "                     If <dev> starts with a digit, then 
/dev/radio<dev> is used\n"
               "                     default: checks for RDS-capable devices,\n"
               "                     uses device with lowest ID\n"
               "  -h, --help         display this help message\n"
@@ -763,9 +763,10 @@ static int parse_cl(int argc, char **argv)
                switch (opt) {
                case OptSetDevice:
                        strncpy(params.fd_name, optarg, 80);
-                       if (isdigit(optarg[0]) && optarg[1] == 0) {
-                               char newdev[20];
-                               sprintf(newdev, "/dev/radio%c", optarg[0]);
+                       if (optarg[0] >= '0' && optarg[0] <= '9' && 
strlen(optarg) <= 3) {
+                               static char newdev[20];
+
+                               sprintf(newdev, "/dev/radio%s", optarg);
                                strncpy(params.fd_name, newdev, 20);
                        }
                        break;

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

Reply via email to