All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] Add option to support version
@ 2010-11-03 10:16 Yang Gu
  2010-11-03 10:31 ` Marcel Holtmann
  0 siblings, 1 reply; 2+ messages in thread
From: Yang Gu @ 2010-11-03 10:16 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1023 bytes --]

---
 src/main.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/main.cpp b/src/main.cpp
index d7de416..d601ac2 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -28,7 +28,7 @@ static void usage()
 {
     qWarning() << "Usage:"
                << QFileInfo(QCoreApplication::instance()->applicationFilePath()).fileName().toLocal8Bit().constData()
-               << "[-p port] [-gui] filename";
+               << "[-v] [-p port] [-gui] filename";
     exit(-1);
 }
 
@@ -43,7 +43,10 @@ int main(int argc, char **argv)
     // Parse the command-line.
     index = 1;
     for (index = 1; index < argc; index++) {
-        if (strcmp(argv[index],"-p") == 0) {
+        if (strcmp(argv[index],"-v") == 0) {
+            qWarning() << VERSION;
+            exit(0);
+        } else if (strcmp(argv[index],"-p") == 0) {
             index++;
             if (index >= argc) {
                 qWarning() << "ERROR: Got -p but missing port number";
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-03 10:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-03 10:16 [PATCH v2] Add option to support version Yang Gu
2010-11-03 10:31 ` Marcel Holtmann

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.