]> git.openfabrics.org - ~shefty/ibacm.git/commitdiff
pop (CONFLICT)
authorSean Hefty <sean.hefty@intel.com>
Sat, 24 Jul 2010 01:00:42 +0000 (18:00 -0700)
committerSean Hefty <sean.hefty@intel.com>
Sat, 24 Jul 2010 01:00:42 +0000 (18:00 -0700)
meta
patches/cfg

diff --git a/meta b/meta
index 433c017321dd0fbf84efb1a5ecff097f425831fa..b370f076537f29b4cdce9c8d261cdb0354f8faa1 100644 (file)
--- a/meta
+++ b/meta
@@ -1,9 +1,9 @@
 Version: 1
-Previous: 2c4e1f8f347ae4b0b000b23bb619ff0e58f4f24b
+Previous: 5a505514b1471556208d791179cb7bc593757f6c
 Head: 4339147e98565cbe100d1378a378499e6d70c223
 Applied:
   typo: e733d04dcaf637e600b3f1873befa4e8eaef4f83
   daemon: 7b29fa2e46e60f2cec734b59f7efe8cdeec59660
+  cfg: 4339147e98565cbe100d1378a378499e6d70c223
 Unapplied:
-  cfg: 40e4f86ae3897a335dc63c358e29a98480bed111
 Hidden:
index 9115ea22c5f2e573569d2fe97edecc9dd8dc968b..db65a18099340ed8b7e58a747d66803107441b07 100644 (file)
@@ -1,5 +1,5 @@
-Bottom: c0b0b9437af8a63e1983d07068459108d805ce35
-Top:    ce84fc8f9ffa7720dac563afffa748f944088dfb
+Bottom: d4ad38b0621522078c4a0701602ea4b83a80e903
+Top:    d4ad38b0621522078c4a0701602ea4b83a80e903
 Author: Sean Hefty <sean.hefty@intel.com>
 Date:   2010-07-23 17:12:24 -0700
 
@@ -15,108 +15,4 @@ Signed-off-by: Sean Hefty <sean.hefty@intel.com>
 
 ---
 
-diff --git a/src/acm.c b/src/acm.c
-index 2b1e1fd..53499f9 100755
---- a/src/acm.c
-+++ b/src/acm.c
-@@ -191,6 +191,8 @@ static struct acm_client client[FD_SETSIZE - 1];
- static FILE *flog;
- static lock_t log_lock;
-+static char *opts_file = "/etc/ibacm/acm_opts.cfg"
-+static char *addr_file = "/etc/ibacm/acm_addr.cfg"
- static char log_file[128] = "stdout";
- static int log_level = 0;
- static enum acm_addr_prot addr_prot = ACM_ADDR_PROT_ACM;
-@@ -2638,7 +2640,11 @@ static void daemonize(void)
- static void show_usage(char *program)
- {
-       printf("usage: %s\n", program);
--      printf("   [-D] - run as a daemon\n");
-+      printf("   [-D]             - run as a daemon\n");
-+      printf("   [-A addr_file]   - address configuration file\n");
-+      printf("                      (default /etc/ibacm/acm_addr.cfg\n");
-+      printf("   [-O option_file] - option configuration file\n");
-+      printf("                      (default /etc/ibacm/acm_opts.cfg\n");
- }
- int CDECL_FUNC main(int argc, char **argv)
-@@ -2647,11 +2653,17 @@ int CDECL_FUNC main(int argc, char **argv)
-       int dev_cnt;
-       int op, i, daemon = 0;
--      while ((op = getopt(argc, argv, "D")) != -1) {
-+      while ((op = getopt(argc, argv, "DA:O:")) != -1) {
-               switch (op) {
-               case 'D':
-                       daemon = 1;
-                       break;
-+              case 'A':
-+                      addr_file = optarg;
-+                      break;
-+              case 'O':
-+                      opts_file = optarg;
-+                      break;
-               default:
-                       show_usage(argv[0]);
-                       exit(1);
-diff --git a/src/acme.c b/src/acme.c
-index 5a5a09a..6ec472f 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);
+