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

diff --git a/meta b/meta
index eb71a5a8e7507d797614c1b7340ce5a148f88005..d6b364c2c907d6080ccc72c179a8cd3e04462e37 100644 (file)
--- a/meta
+++ b/meta
@@ -1,6 +1,6 @@
 Version: 1
-Previous: 7b9b05e1e73c39f5de44fb0e0e17a45e2d9a52dd
-Head: 4d3083201aee67e99ae4b1adf1fcea48b27212fd
+Previous: 4b926af247e2457017da4930ec1c0599a3360e78
+Head: 4fc79c8820acd79fdc4ddb435135a13872dfa2ee
 Applied:
   logging: 549692c49922dce3911d97dcc6d0a2fc583ab5f7
   acm_snoop: dd5542fbaa1c5a92367d0552ef3525d5ea0a4638
@@ -10,6 +10,7 @@ Applied:
   lower_retries: 25005d0475638542ab125b42d439d853c185402a
   locking: 2945ee3502392e543e39ddfb642057bc80cad9ef
   acme_verbose: 4d3083201aee67e99ae4b1adf1fcea48b27212fd
+  refresh-temp: 4fc79c8820acd79fdc4ddb435135a13872dfa2ee
 Unapplied:
   1.0.4: 9f452b8e59adb21b90fbdda980d25a54d4360d37
 Hidden:
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..72acc2d
--- /dev/null
@@ -0,0 +1,239 @@
+Bottom: c4ae3ad9833713b83fe0586ab3a14204c72d5e4c
+Top:    faec08412cb2aabd5d7db2480156545271ba0926
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2010-12-03 12:50:31 -0800
+
+Refresh of acme_verbose
+
+---
+
+diff --git a/linux/acme_linux.c b/linux/acme_linux.c
+index d473be0..cf23581 100644
+--- a/linux/acme_linux.c
++++ b/linux/acme_linux.c
+@@ -146,7 +146,7 @@ get_devaddr(int s, struct ifreq *ifr,
+       return -1;
+ }
+-int gen_addr_ip(FILE *addr_file, FILE *out_file)
++int gen_addr_ip(FILE *f)
+ {
+       struct ifconf *ifc;
+       struct ifreq *ifr;
+@@ -206,7 +206,7 @@ int gen_addr_ip(FILE *addr_file, FILE *out_file)
+               fprintf(outf, "%s %s %d 0x%x\n",
+                       ip, verbs[dev_index]->device->name, port, pkey);
+-              fprintf(addr_file, "%s %s %d 0x%x\n",
++              fprintf(f, "%s %s %d 0x%x\n",
+                       ip, verbs[dev_index]->device->name, port, pkey);
+       }
+       ret = 0;
+diff --git a/src/acme.c b/src/acme.c
+index 9593ec6..0e3c7a9 100644
+--- a/src/acme.c
++++ b/src/acme.c
+@@ -219,7 +219,7 @@ static int open_dir(void)
+ {
+       mkdir(dest_dir, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH);
+       if (chdir(dest_dir)) {
+-              printf("Failed to open directory %s: %s\n", dest_dir, strerror(errno));
++              fprintf(errf, "Failed to open directory %s: %s\n", dest_dir, strerror(errno));
+               return -1;
+       }
+       return 0;
+@@ -229,9 +229,9 @@ static int gen_opts(void)
+ {
+       FILE *f;
+-      VPRINT("Generating %s/%s\n", dest_dir, opts_file);
++      fprintf(outf, "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));
++              fprintf(errf, "Failed to open option configuration file: %s\n", strerror(errno));
+               return -1;
+       }
+@@ -275,7 +275,7 @@ static int open_verbs(void)
+       dev_array = ibv_get_device_list(&dev_cnt);
+       if (!dev_array) {
+-              printf("ibv_get_device_list - no devices present?\n");
++              fprintf(errf, "ibv_get_device_list - no devices present?\n");
+               return -1;
+       }
+@@ -288,7 +288,7 @@ static int open_verbs(void)
+       for (i = 0; i < dev_cnt; i++) {
+               verbs[i] = ibv_open_device(dev_array[i]);
+               if (!verbs) {
+-                      printf("ibv_open_device - failed to open device\n");
++                      fprintf(errf, "ibv_open_device - failed to open device\n");
+                       ret = -1;
+                       goto err2;
+               }
+@@ -325,7 +325,7 @@ static int gen_addr_names(FILE *f)
+       ret = gethostname(host_name, sizeof host_name);
+       if (ret) {
+-              printf("gethostname error: %d\n", ret);
++              fprintf(errf, "gethostname error: %d\n", ret);
+               return ret;
+       }
+       strtok(host_name, ".");
+@@ -341,7 +341,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) {
+-                                      VPRINT("%s %s %d default\n",
++                                      fprintf(outf, "%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);
+@@ -349,7 +349,7 @@ static int gen_addr_names(FILE *f)
+                               }
+                       }
+-                      VPRINT("%s-%d %s %d default\n",
++                      fprintf(outf, "%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);
+@@ -364,9 +364,9 @@ static int gen_addr(void)
+       FILE *f;
+       int ret;
+-      VPRINT("Generating %s/%s\n", dest_dir, addr_file);
++      fprintf(outf, "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));
++              fprintf(errf, "Failed to open address configuration file: %s\n", strerror(errno));
+               return -1;
+       }
+@@ -378,13 +378,13 @@ static int gen_addr(void)
+       gen_addr_temp(f);
+       ret = gen_addr_names(f);
+       if (ret) {
+-              printf("Failed to auto generate host names in config file\n");
++              fprintf(errf, "Failed to auto generate host names in config file\n");
+               goto out2;
+       }
+       ret = gen_addr_ip(f);
+       if (ret) {
+-              printf("Failed to auto generate IP addresses in config file\n");
++              fprintf(errf, "Failed to auto generate IP addresses in config file\n");
+               goto out2;
+       }
+@@ -400,23 +400,23 @@ static void show_path(struct ibv_path_record *path)
+       char gid[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff"];
+       uint32_t fl_hop;
+-      printf("Path information\n");
++      fprintf(outf, "Path information\n");
+       inet_ntop(AF_INET6, path->dgid.raw, gid, sizeof gid);
+-      printf("  dgid: %s\n", gid);
++      fprintf(outf, "  dgid: %s\n", gid);
+       inet_ntop(AF_INET6, path->sgid.raw, gid, sizeof gid);
+-      printf("  sgid: %s\n", gid);
+-      printf("  dlid: 0x%x\n", ntohs(path->dlid));
+-      printf("  slid: 0x%x\n", ntohs(path->slid));
++      fprintf(outf, "  sgid: %s\n", gid);
++      fprintf(outf, "  dlid: 0x%x\n", ntohs(path->dlid));
++      fprintf(outf, "  slid: 0x%x\n", ntohs(path->slid));
+       fl_hop = ntohl(path->flowlabel_hoplimit);
+-      printf("  flow label: 0x%x\n", fl_hop >> 8);
+-      printf("  hop limit: %d\n", (uint8_t) fl_hop);
+-      printf("  tclass: %d\n", path->tclass);
+-      printf("  reverisible: %d\n", path->reversible_numpath >> 7);
+-      printf("  pkey: 0x%x\n", ntohs(path->pkey));
+-      printf("  sl: %d\n", ntohs(path->qosclass_sl) & 0xF);
+-      printf("  mtu: %d\n", path->mtu & 0x1F);
+-      printf("  rate: %d\n", path->rate & 0x1F);
+-      printf("  packet lifetime: %d\n", path->packetlifetime & 0x1F);
++      fprintf(outf, "  flow label: 0x%x\n", fl_hop >> 8);
++      fprintf(outf, "  hop limit: %d\n", (uint8_t) fl_hop);
++      fprintf(outf, "  tclass: %d\n", path->tclass);
++      fprintf(outf, "  reverisible: %d\n", path->reversible_numpath >> 7);
++      fprintf(outf, "  pkey: 0x%x\n", ntohs(path->pkey));
++      fprintf(outf, "  sl: %d\n", ntohs(path->qosclass_sl) & 0xF);
++      fprintf(outf, "  mtu: %d\n", path->mtu & 0x1F);
++      fprintf(outf, "  rate: %d\n", path->rate & 0x1F);
++      fprintf(outf, "  packet lifetime: %d\n", path->packetlifetime & 0x1F);
+ }
+ static int resolve_ip(struct ibv_path_record *path)
+@@ -428,21 +428,21 @@ static int resolve_ip(struct ibv_path_record *path)
+       src.sin_family = AF_INET;
+       ret = inet_pton(AF_INET, src_addr, &src.sin_addr);
+       if (ret <= 0) {
+-              printf("inet_pton error on source address (%s): 0x%x\n", src_addr, ret);
++              fprintf(ferr, "inet_pton error on source address (%s): 0x%x\n", src_addr, ret);
+               return ret;
+       }
+       dest.sin_family = AF_INET;
+       ret = inet_pton(AF_INET, dest_addr, &dest.sin_addr);
+       if (ret <= 0) {
+-              printf("inet_pton error on destination address (%s): 0x%x\n", dest_addr, ret);
++              fprintf(errf, "inet_pton error on destination address (%s): 0x%x\n", dest_addr, ret);
+               return ret;
+       }
+       ret = ib_acm_resolve_ip((struct sockaddr *) &src, (struct sockaddr *) &dest,
+               &paths, &count);
+       if (ret) {
+-              printf("ib_acm_resolve_ip failed: 0x%x\n", ret);
++              fprintf(errf, "ib_acm_resolve_ip failed: 0x%x\n", ret);
+               return ret;
+       }
+@@ -458,7 +458,7 @@ static int resolve_name(struct ibv_path_record *path)
+       ret = ib_acm_resolve_name(src_addr, dest_addr, &paths, &count);
+       if (ret) {
+-              printf("ib_acm_resolve_name failed: 0x%x\n", ret);
++              fprintf(errf, "ib_acm_resolve_name failed: 0x%x\n", ret);
+               return ret;
+       }
+@@ -477,7 +477,7 @@ static int resolve_lid(struct ibv_path_record *path)
+       ret = ib_acm_resolve_path(path, 0);
+       if (ret)
+-              printf("ib_acm_resolve_path failed: 0x%x\n", ret);
++              fprintf(errf, "ib_acm_resolve_path failed: 0x%x\n", ret);
+       return ret;
+ }
+@@ -488,9 +488,9 @@ static int verify_resolve(struct ibv_path_record *path)
+       ret = ib_acm_resolve_path(path, ACM_FLAGS_QUERY_SA);
+       if (ret)
+-              printf("SA verification: failed 0x%x\n", ret);
++              fprintf(errf, "SA verification: failed 0x%x\n", ret);
+       else
+-              printf("SA verification: success\n");
++              fprintf(outf, "SA verification: success\n");
+       return ret;
+ }
+@@ -502,7 +502,7 @@ static int resolve(char *program)
+       ret = libacm_init();
+       if (ret) {
+-              printf("Unable to contact ib_acm service\n");
++              fprintf(errf, "Unable to contact ib_acm service\n");
+               return ret;
+       }
+@@ -606,6 +606,6 @@ int CDECL_FUNC main(int argc, char **argv)
+ out:
+       if (verbose || !(make_addr || make_opts) || ret)
+-              printf("return status 0x%x\n", ret);
++              fprintf(outf, "return status 0x%x\n", ret);
+       return ret;
+ }