]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
refresh (create temporary patch)
authorSean Hefty <sean.hefty@intel.com>
Sat, 24 Jul 2010 00:46:49 +0000 (17:46 -0700)
committerSean Hefty <sean.hefty@intel.com>
Sat, 24 Jul 2010 00:46:49 +0000 (17:46 -0700)
meta
patches/refresh-temp [new file with mode: 0644]

diff --git a/meta b/meta
index 4f1cb9d63289c11d9555d29726d1a7db825a0491..8ab4a3ef04be293f021c3a6278fce8026b626707 100644 (file)
--- a/meta
+++ b/meta
@@ -1,8 +1,9 @@
 Version: 1
-Previous: 409101580129ffb796f7a6a1b8c6c4770017ef85
-Head: f8c7e46b1936583ff2bcb6356e1f0f6cdfde01a7
+Previous: d4958fb34dcc60f797927312dfc8d03e8f4e2ea7
+Head: 641e51783ffd5e41910e5e5064d15d371288f3a0
 Applied:
   cfg: f8c7e46b1936583ff2bcb6356e1f0f6cdfde01a7
+  refresh-temp: 641e51783ffd5e41910e5e5064d15d371288f3a0
 Unapplied:
   daemon: d181ac6bc8261d6f0fe4935d2035e0beff560bd9
 Hidden:
diff --git a/patches/refresh-temp b/patches/refresh-temp
new file mode 100644 (file)
index 0000000..e27cddd
--- /dev/null
@@ -0,0 +1,69 @@
+Bottom: 7ba4916f6ef28f711b42fb3c392b5c0f267a8104
+Top:    e961a894957bc197bbac3f7160fcf410911d5b3e
+Author: Sean Hefty <sean.hefty@intel.com>
+Date:   2010-07-23 17:46:49 -0700
+
+Refresh of cfg
+
+---
+
+diff --git a/src/acme.c b/src/acme.c
+index 5a5a09a..85d4ada 100644
+--- a/src/acme.c
++++ b/src/acme.c
+@@ -39,6 +39,8 @@
+ #include <infiniband/acm.h>
+ #include "libacm.h"
++static char opts_file[100] = "//etc//ibacm//acm_opts.cfg";
++static char addr_file[100] = "//etc//ibacm//acm_addr.cfg";
+ static char *dest_addr;
+ static char *src_addr;
+ static char addr_type = 'i';
+@@ -62,6 +64,8 @@ static void show_usage(char *program)
+       printf("usage 2: %s\n", program);
+       printf("   -A               - generate local acm_addr.cfg configuration file\n");
+       printf("   -O               - generate local acm_ops.cfg options file\n");
++      printf("   -D               - specify destination directory for output files\n");
++      printf("                      (default is /etc/ibacm)\n");
+ }
+ static void gen_opts_temp(FILE *f)
+@@ -191,7 +195,7 @@ static int gen_opts(void)
+       FILE *f;
+       printf("Generating acm_opts.cfg\n");
+-      if (!(f = fopen("acm_opts.cfg", "w"))) {
++      if (!(f = fopen(opts_file, "w"))) {
+               printf("Failed to open option configuration file\n");
+               return -1;
+       }
+@@ -326,7 +330,7 @@ static int gen_addr(void)
+       int ret;
+       printf("Generating acm_addr.cfg\n");
+-      if (!(f = fopen("acm_addr.cfg", "w"))) {
++      if (!(f = fopen(addr_file, "w"))) {
+               printf("Failed to open address configuration file\n");
+               return -1;
+       }
+@@ -501,7 +505,7 @@ int CDECL_FUNC main(int argc, char **argv)
+       if (ret)
+               goto out;
+-      while ((op = getopt(argc, argv, "f:s:d:vAO")) != -1) {
++      while ((op = getopt(argc, argv, "f:s:d:vAOD:")) != -1) {
+               switch (op) {
+               case 'f':
+                       addr_type = optarg[0];
+@@ -521,6 +525,10 @@ int CDECL_FUNC main(int argc, char **argv)
+               case 'O':
+                       make_opts = 1;
+                       break;
++              case 'D':
++                      snprintf(opts_file, "%s//acm_opts.cfg", 80, optarg);
++                      snprintf(addr_file, "%s//acm_addr.cfg", 80, optarg);
++                      break;
+               default:
+                       show_usage(argv[0]);
+                       exit(1);