minicom: fix -v/-h return value
authorLu Chong <Chong.Lu@windriver.com>
Wed, 16 Oct 2013 07:02:13 +0000 (15:02 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 26 Oct 2013 14:59:12 +0000 (15:59 +0100)
The previous return value for '-h' and '-v' options was 1 which was
not correct. These two options should return 0 instead.

(From OE-Core rev: 88701b8c8b73202a738447ea8a1c169a0efdc7ed)

Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-extended/minicom/minicom-2.6.2/0001-fix-minicom-h-v-return-value-is-not-0.patch [new file with mode: 0644]
meta/recipes-extended/minicom/minicom_2.6.2.bb

diff --git a/meta/recipes-extended/minicom/minicom-2.6.2/0001-fix-minicom-h-v-return-value-is-not-0.patch b/meta/recipes-extended/minicom/minicom-2.6.2/0001-fix-minicom-h-v-return-value-is-not-0.patch
new file mode 100644 (file)
index 0000000..bd8261c
--- /dev/null
@@ -0,0 +1,35 @@
+Subject: [PATCH] fix minicom -h/-v return value is not 0
+
+Upstream-Status: Pending
+
+Signed-off-by: Lu Chong <Chong.Lu@windriver.com>
+
+---
+ src/minicom.c |    6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/src/minicom.c b/src/minicom.c
+index e1a557b..730da7c 100644
+--- a/src/minicom.c
++++ b/src/minicom.c
+@@ -1166,15 +1166,13 @@ int main(int argc, char **argv)
+                "modify it under the terms of the GNU General Public License\n"
+                  "as published by the Free Software Foundation; either version\n"
+                  "2 of the License, or (at your option) any later version.\n\n");
+-          exit(1);
+-          break;
++          exit(0);
+         case 's': /* setup mode */
+           dosetup = 1;
+           break;
+         case 'h':
+           helpthem();
+-          exit(1);
+-          break;
++          exit(0);
+         case 'p': /* Pseudo terminal to use. */
+           if (strncmp(optarg, "/dev/", 5) == 0)
+             optarg += 5;
+-- 
+1.7.9.5
+
index 558867d..bef386a 100644 (file)
@@ -10,6 +10,7 @@ PR = "r0"
 
 SRC_URI = "http://alioth.debian.org/frs/download.php/3869/minicom-${PV}.tar.gz \
            file://allow.to.disable.lockdev.patch \
+           file://0001-fix-minicom-h-v-return-value-is-not-0.patch \
 "
 
 SRC_URI[md5sum] = "203c56c4b447f45e2301b0cc4e83da3c"