]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Fri, 3 Dec 2010 00:00:09 +0000 (16:00 -0800)
committerSean Hefty <sean.hefty@intel.com>
Fri, 3 Dec 2010 00:00:09 +0000 (16:00 -0800)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index cb218addc645810cc5defea12f38f857c6276f74..67f57cc6ffd40fef1fda775aa2eb070a59b1f5e0 100644 (file)
--- a/meta
+++ b/meta
@@ -1,6 +1,6 @@
 Version: 1
-Previous: ead2a3f29a9c73b3689f10d9b40e395e4312ecaf
-Head: 40fa3470aa81824416a6c78bd0106a9a0ffa439f
+Previous: 8f75e230bf8f18c99f824fa404b38ddae809cee7
+Head: b5ac54f1ab2b9fa0754211d53b89aca45803ee2d
 Applied:
   logging: 549692c49922dce3911d97dcc6d0a2fc583ab5f7
   acm_snoop: dd5542fbaa1c5a92367d0552ef3525d5ea0a4638
@@ -10,6 +10,7 @@ Applied:
   lower_retries: 25005d0475638542ab125b42d439d853c185402a
   locking: 2945ee3502392e543e39ddfb642057bc80cad9ef
   acme_verbose: 40fa3470aa81824416a6c78bd0106a9a0ffa439f
+  refresh-temp: b5ac54f1ab2b9fa0754211d53b89aca45803ee2d
 Unapplied:
   1.0.4: 9f452b8e59adb21b90fbdda980d25a54d4360d37
 Hidden:
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..7dc223a
--- /dev/null
@@ -0,0 +1,114 @@
+Bottom: caa30f6e0c510b4add867f1d87a2133c5a4d0bc1
+Top:    c781f7cd8e6f5fb5bc7518f06ac522b77764f701
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2010-12-02 16:00:09 -0800
+
+Refresh of acme_verbose
+
+---
+
+diff --git a/src/acm.c b/src/acm.c
+index 3a5404a..dfc6e48 100644
+--- a/src/acm.c
++++ b/src/acm.c
+@@ -34,6 +34,7 @@
+ #include <stdio.h>
+ #include <stdarg.h>
+ #include <string.h>
++#include <fcntl.h>
+ #include <osd.h>
+ #include <arpa/inet.h>
+ #include <sys/stat.h>
+diff --git a/src/acme.c b/src/acme.c
+index 552f42a..d9f048f 100644
+--- a/src/acme.c
++++ b/src/acme.c
+@@ -51,6 +51,7 @@ static char *dest_addr;
+ static char *src_addr;
+ static char addr_type = 'i';
+ static int verify;
++static int verbose;
+ static int make_addr;
+ static int make_opts;
+@@ -59,6 +60,8 @@ int dev_cnt;
+ extern int gen_addr_ip(FILE *f);
++#define VPRINT(format, ...) { if (verbose) printf(format, ## __VA_ARGS__ ); }
++
+ static void show_usage(char *program)
+ {
+       printf("usage 1: %s\n", program);
+@@ -74,6 +77,7 @@ static void show_usage(char *program)
+       printf("                      (default is %s)\n", ACM_OPTS_FILE);
+       printf("   -D dest_dir      - specify destination directory for output files\n");
+       printf("                      (default is %s)\n", ACM_DEST_DIR);
++      printf("   -V               - enable verbose output\n");
+ }
+ static void gen_opts_temp(FILE *f)
+@@ -224,7 +228,7 @@ static int gen_opts(void)
+ {
+       FILE *f;
+-      printf("Generating %s/%s\n", dest_dir, opts_file);
++      VPRINT("Generating %s/%s\n", dest_dir, opts_file);
+       if (open_dir() || !(f = fopen(opts_file, "w"))) {
+               printf("Failed to open option configuration file: %s\n", strerror(errno));
+               return -1;
+@@ -336,7 +340,7 @@ static int gen_addr_names(FILE *f)
+                       if (!found_active) {
+                               ret = ibv_query_port(verbs[i], p, &port_attr);
+                               if (!ret && port_attr.state == IBV_PORT_ACTIVE) {
+-                                      printf("%s %s %d default\n",
++                                      VPRINT("%s %s %d default\n",
+                                               host_name, verbs[i]->device->name, p);
+                                       fprintf(f, "%s %s %d default\n",
+                                               host_name, verbs[i]->device->name, p);
+@@ -344,7 +348,7 @@ static int gen_addr_names(FILE *f)
+                               }
+                       }
+-                      printf("%s-%d %s %d default\n",
++                      VPRINT("%s-%d %s %d default\n",
+                               host_name, index, verbs[i]->device->name, p);
+                       fprintf(f, "%s-%d %s %d default\n",
+                               host_name, index++, verbs[i]->device->name, p);
+@@ -359,7 +363,7 @@ static int gen_addr(void)
+       FILE *f;
+       int ret;
+-      printf("Generating %s/%s\n", dest_dir, addr_file);
++      VPRINT("Generating %s/%s\n", dest_dir, addr_file);
+       if (open_dir() || !(f = fopen(addr_file, "w"))) {
+               printf("Failed to open address configuration file: %s\n", strerror(errno));
+               return -1;
+@@ -546,7 +550,7 @@ int CDECL_FUNC main(int argc, char **argv)
+       if (ret)
+               goto out;
+-      while ((op = getopt(argc, argv, "f:s:d:vA::O::D:")) != -1) {
++      while ((op = getopt(argc, argv, "f:s:d:vA::O::D:V")) != -1) {
+               switch (op) {
+               case 'f':
+                       addr_type = optarg[0];
+@@ -573,6 +577,9 @@ int CDECL_FUNC main(int argc, char **argv)
+               case 'D':
+                       dest_dir = optarg;
+                       break;
++              case 'V':
++                      verbose = 1;
++                      break;
+               default:
+                       show_usage(argv[0]);
+                       exit(1);
+@@ -595,6 +602,7 @@ int CDECL_FUNC main(int argc, char **argv)
+               ret = gen_opts();
+ out:
+-      printf("return status 0x%x\n", ret);
++      if (verbose || !(make_addr || make_opts) || ret)
++              printf("return status 0x%x\n", ret);
+       return ret;
+ }