From 329746241c44575666a6d16036384c72528ca54f Mon Sep 17 00:00:00 2001
From: Peng Fan <Peng.Fan@freescale.com>
Date: Sat, 9 Aug 2014 20:32:50 +0800
Subject: [PATCH 1/2] Fix getopt_long usage

When passing shorhand options, getopt_long sometimes does not handle
them correctly.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
---
 rtems-ld.cpp     | 2 +-
 rtems-ra.cpp     | 2 +-
 rtems-rapper.cpp | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/rtems-ld.cpp b/rtems-ld.cpp
index a7453cb..51ce8f8 100644
--- a/rtems-ld.cpp
+++ b/rtems-ld.cpp
@@ -199,7 +199,7 @@ main (int argc, char* argv[])
 
     while (true)
     {
-      int opt = ::getopt_long (argc, argv, "hvwVMnb:E:o:O:L:l:a:c:e:d:u:C:W:R:P", rld_opts, NULL);
+      int opt = ::getopt_long (argc, argv, "hvwVMnsSb:E:o:O:L:l:a:c:e:d:u:C:W:R:P:", rld_opts, NULL);
       if (opt < 0)
         break;
 
diff --git a/rtems-ra.cpp b/rtems-ra.cpp
index 07d2f00..e7f87da 100644
--- a/rtems-ra.cpp
+++ b/rtems-ra.cpp
@@ -177,7 +177,7 @@ main (int argc, char* argv[])
 
     while (true)
     {
-      int opt = ::getopt_long (argc, argv, "hVvnS:a:p:L:l:o:C:E:c:R:W:A:r:d", rld_opts, NULL);
+      int opt = ::getopt_long (argc, argv, "hVvnSa:p:L:l:o:C:E:c:R:W:A:r:d:", rld_opts, NULL);
       if (opt < 0)
         break;
 
diff --git a/rtems-rapper.cpp b/rtems-rapper.cpp
index 7610963..59747b4 100644
--- a/rtems-rapper.cpp
+++ b/rtems-rapper.cpp
@@ -1164,7 +1164,7 @@ main (int argc, char* argv[])
 
     while (true)
     {
-      int opt = ::getopt_long (argc, argv, "hvVnaHlsSroxf", rld_opts, NULL);
+      int opt = ::getopt_long (argc, argv, "hvVnaHmlsSroxf", rld_opts, NULL);
       if (opt < 0)
         break;
 
-- 
1.8.4

