You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ma...@apache.org on 2015/12/07 19:03:04 UTC

incubator-mynewt-larva git commit: Add a bit of advice on what the command line arguments are.

Repository: incubator-mynewt-larva
Updated Branches:
  refs/heads/master a98cde0f5 -> b2066eaf6


Add a bit of advice on what the command line arguments are.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/commit/b2066eaf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/tree/b2066eaf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/diff/b2066eaf

Branch: refs/heads/master
Commit: b2066eaf6f5be94858ad244c210217ba368da375
Parents: a98cde0
Author: Marko Kiiskila <ma...@runtime.io>
Authored: Mon Dec 7 10:02:18 2015 -0800
Committer: Marko Kiiskila <ma...@runtime.io>
Committed: Mon Dec 7 10:02:18 2015 -0800

----------------------------------------------------------------------
 project/ffs2native/src/main.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-larva/blob/b2066eaf/project/ffs2native/src/main.c
----------------------------------------------------------------------
diff --git a/project/ffs2native/src/main.c b/project/ffs2native/src/main.c
index fdab0dd..395103a 100644
--- a/project/ffs2native/src/main.c
+++ b/project/ffs2native/src/main.c
@@ -37,6 +37,7 @@
 #endif
 
 static const char *copy_in_dir;
+static const char *progname;
 
 #define MAX_AREAS	16
 static struct nffs_area_desc area_descs[MAX_AREAS];
@@ -167,7 +168,11 @@ copy_in_directory(const char *src, const char *dst)
 static void
 usage(int rc)
 {
-    printf("Improper use\n");
+    printf("%s [-c]|[-d dir][-f flash_file]\n", progname);
+    printf("  Tool for operating on simulator flash image file\n");
+    printf("   -c: ...\n");
+    printf("   -d: use dir as root for NFFS portion and create flash image\n");
+    printf("   -f: flash_file is the name of the flash image file\n");
     exit(rc);
 }
 
@@ -179,6 +184,8 @@ main(int argc, char **argv)
     int ch;
     int cnt;
 
+    progname = argv[0];
+
     while ((ch = getopt(argc, argv, "c:d:f:")) != -1) {
         switch (ch) {
         case 'c':