Diff for /embedtools/src/ube.c between versions 1.1.2.1 and 1.1.2.2

version 1.1.2.1, 2014/01/28 08:04:21 version 1.1.2.2, 2014/01/28 08:28:18
Line 2 Line 2
 #include "ub_env.h"  #include "ub_env.h"
   
   
   int Verbose;
   extern char compiled[], compiledby[], compilehost[];
   
   
   static void
   Usage()
   {
           printf( " -= U-Boot-Env =- Tool for u-boot-env nand map management\n"
                   "=== %s === %s@%s ===\n\n"
                   "  Syntax: ube [options] [set_value]\n"
                   "\n"
                   "\t-g <name>\tSet parameter to value\n"
                   "\t-s <name>\tGet parameter value\n"
                   "\t-v\t\tVerbose ...\n"
                   "\n", compiled, compiledby, compilehost);
   }
   
   int
   main(int argc, char **argv)
   {
           char ch, mode = 0, szName[STRSIZ], szVal[STRSIZ] = { 0 };
   
           while ((ch = getopt(argc, argv, "hvg:s:")) != -1)
                   switch (ch) {
                           case 'g':
                                   mode = 1;
                                   strlcpy(szName, optarg, sizeof szName);
                                   break;
                           case 's':
                                   mode = 2;
                                   strlcpy(szName, optarg, sizeof szName);
                                   break;
                           case 'v':
                                   Verbose++;
                                   break;
                           case 'h':
                           default:
                                   Usage();
                                   return 1;
                   }
           argc -= optind;
           argv += optind;
           if (mode == 2) {
                   if (!argc) {
                           Usage();
                           return 1;
                   } else
                           strlcpy(szVal, *argv, sizeof szVal);
           }
   
           VERB(1) printf("u-boot-env: name=%s value=%s\n", szName, szVal);
   
           return 0;
   }

Removed from v.1.1.2.1  
changed lines
  Added in v.1.1.2.2


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>